Business-AU-Ledger
view release on metacpan or search on metacpan
lib/Business/AU/Ledger/View/Context.pm view on Meta::CPAN
package Business::AU::Ledger::View::Context;
use Business::AU::Ledger::Util::Validate;
use JSON::XS;
use Moose;
extends 'Business::AU::Ledger::View::Base';
use namespace::autoclean;
our $VERSION = '0.88';
# -----------------------------------------------
sub format
{
my($self, $input) = @_;
$self -> log(__PACKAGE__ . '. Leaving format');
return
[
{
month => $$input{'start_month'},
time => 'From',
year => $$input{'start_year'},
},
{
month => $$input{'end_month'},
time => 'To',
year => $$input{'end_year'},
}
];
} # End of format.
# -----------------------------------------------
sub get
{
my($self, $input) = @_;
$self -> log(__PACKAGE__ . '. Leaving get');
return
{
end_month => $self -> session -> param('end_month'),
end_year => $self -> session -> param('end_year'),
start_month => $self -> session -> param('start_month'),
start_year => $self -> session -> param('start_year'),
};
} # End of get.
# -----------------------------------------------
sub log
{
my($self, $s) = @_;
$self -> db -> log($s);
} # End of log.
# -----------------------------------------------
sub process
{
my($self, $input) = @_;
( run in 0.530 second using v1.01-cache-2.11-cpan-e93a5daba3e )