Data::Properties::YAML - YAML-ized properties for your application
Do not use - this module has been deprecated.
use Data::Properties::YAML; my $yaml = Data::Properties::YAML->new( properties_file => '/etc/properties.yaml' ); # OR: my $yaml = Data::Properties::YAML->new( yaml_data => <<'YAML', --- password_resend: general: is_not_found: Invalid email address contact_email: is_missing: Required is_invalid: Invalid email address is_not_found: Email is not valid - please try again. YAML ); # Access your properties: print "Error: " . $yaml->general->is_not_found; # Access another property: print "Another error: " . $yaml->contact_email->is_missing; # Dies "Node root.general has no property named 'isnt_found'" $yaml->general->isnt_found;
YAML is a simple way to store many strings. Why not use it in place of the typical "properties" file as used by java.util.properties?
java.util.properties
Why not give ourselves a nice Perl-ish interface?
Well, here we go. Use Data::Properties::YAML and you have just that.
Returns a new Data::Properties::YAML object based on the structure of your YAML.
Data::Properties::YAML
YAML
It's possible that some bugs have found their way into this release.
Use RT http://rt.cpan.org/NoAuth/Bugs.html?Dist=Data-Properties-YAML to submit bug reports.
Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Data::Properties::YAML in action.
John Drago mailto:jdrago_999@yahoo.com
Copyright 2008 John Drago, All rights reserved.
This software is free software. It may be used and distributed under the same terms as Perl itself.
To install Data::Properties::YAML, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Data::Properties::YAML
CPAN shell
perl -MCPAN -e shell install Data::Properties::YAML
For more information on module installation, please visit the detailed CPAN module installation guide.