DateTimeX::Format::CustomPattern
This role must be composed before DateTimeX::Format.
It adds an attribute "pattern", and behavies cosistant with the call-overriding environment of DateTimeX::Format.
package DateTimeX::Format::RequiresPattern; with 'DateTimeX::Format::CustomPattern'; with 'DateTimeX::Format'; package main; my $dt = DateTimeX::Format::RequiresPattern->new({ locale => $locale , timezone => $timezone , pattern => '%H:%M:%S' , debug => 0|1 , defaults => 0|1 }); $dt->parse_datetime( $time, {pattern => '%H:%M'} );
To install DateTimeX::Format, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DateTimeX::Format
CPAN shell
perl -MCPAN -e shell install DateTimeX::Format
For more information on module installation, please visit the detailed CPAN module installation guide.