NAME

Net::Lighthouse::Util - Util

SYNOPSIS

    use Net::Lighthouse::Util;

DESCRIPTION

utility methods live here

INTERFACE

translate_from_xml( $hashref | $xml_string )

translate from xml, the general translation map is: 'foo-bar' => 'foo_bar', value bool false | true => 0 | 1, value yaml string => object value datetime string => DateTime object

translate_to_xml( $hashref, root => 'project', boolean => ['foo','bar'] )

generally, the reverse of translate_from_xml.

read_xml write_xml

wrap of XML::TreePP->parse and XML::TreePP->write, respectively

datetime_from_string

parse string to a DateTime object, and translate its timezone to UTC

SEE ALSO

DateTime, YAML::Syck

AUTHOR

sunnavy <sunnavy@bestpractical.com>

LICENCE AND COPYRIGHT

Copyright 2009-2010 Best Practical Solutions.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.