DBIx::Class::InflateColumn::DateTimeX::Immutable - Inflate/deflate DBIx::Class columns to DateTimeX::Immutable objects
version 0.33
Load this component and then declare one or more columns to be of the datetime, timestamp or date datatype.
package Event; use base 'DBIx::Class::Core'; __PACKAGE__->load_components(qw/InflateColumn::DateTimeX::Immutable/); __PACKAGE__->add_columns( starts_when => { data_type => 'datetime' } create_date => { data_type => 'date' } );
Then you can treat the specified column as a DateTimeX::Immutable object.
print "This event starts the month of ". $event->starts_when->month_name();
This is subclass of DBIx::Class::InflateColumn::DateTime which inflates and deflates columns to DateTimeX::Immutable objects. If functions exactly like its parent, but objects are re-blessed into DateTimeX::Immutable objections.
See DBIx::Class::InflateColumn::DateTime for more documentation.
DateTimeX::Immutable, DBIx::Class::InflateColumn::DateTime, DateTime, DBIx::Class
Mark Grimes, <mgrimes@cpan.org>
This software is copyright (c) 2014 by Mark Grimes, <mgrimes@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install DBIx::Class::InflateColumn::DateTimeX::Immutable, copy and paste the appropriate command in to your terminal.
cpanm
cpanm DBIx::Class::InflateColumn::DateTimeX::Immutable
CPAN shell
perl -MCPAN -e shell install DBIx::Class::InflateColumn::DateTimeX::Immutable
For more information on module installation, please visit the detailed CPAN module installation guide.