From Code to Community: Sponsoring The Perl and Raku Conference 2025 Learn more

NAME

Data::Properties::YAML - YAML-ized properties for your application

DEPRECATED

Do not use - this module has been deprecated.

SYNOPSIS

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;

DESCRIPTION

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?

Why not give ourselves a nice Perl-ish interface?

Well, here we go. Use Data::Properties::YAML and you have just that.

METHODS

new( properties_file => '/path/to/file.yaml' )

Returns a new Data::Properties::YAML object based on the structure of your YAML.

new( yaml_data => $yaml )

Returns a new Data::Properties::YAML object based on the structure of your YAML.

SEE ALSO

YAML

BUGS

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.

HOMEPAGE

Please visit the Apache2::ASP homepage at http://www.devstack.com/ to see examples of Data::Properties::YAML in action.

AUTHOR

John Drago mailto:jdrago_999@yahoo.com

COPYRIGHT AND LICENSE

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.