Toolforge::MixNMatch::Object::YearMonth - Mix'n'match year/month datatype.
use Toolforge::MixNMatch::Object::YearMonth; my $obj = Toolforge::MixNMatch::Object::YearMonth->new(%params); my $count = $obj->count; my $month = $obj->month; my $year = $obj->year;
This datatype is base class for Mix'n'match year/month.
new
my $obj = Toolforge::MixNMatch::Object::YearMonth->new(%params);
Constructor.
Returns instance of object.
count
Count number of records for user. Parameter is required.
month
Month of statistics. Parameter is required.
year
Year of statistics. Parameter is required.
my $count = $obj->count;
Get count for year/month statistics.
Returns number.
my $month = $obj->month;
Get month of statistics.
my $year = $obj->year;
Get year of statistics.
new(): From Mo::utils::check_required(): Parameter 'count' is required. Parameter 'month' is required. Parameter 'year' is required.
use strict; use warnings; use Toolforge::MixNMatch::Object::YearMonth; # Object. my $obj = Toolforge::MixNMatch::Object::YearMonth->new( 'count' => 6, 'month' => 1, 'year' => 2020, ); # Get count for year/month statistics. my $count = $obj->count; # Get month of statistics. my $month = $obj->month; # Get year of statistics. my $year = $obj->year; # Print out. print "Count: $count\n"; print "Month: $month\n"; print "Year: $year\n"; # Output: # Count: 6 # Month: 1 # Year: 2020
Mo, Mo::utils.
Toolforge Mix'n'match tool objects.
https://github.com/michal-josef-spacek/Toolforge-MixNMatch-Object
Michal Josef Špaček mailto:skim@cpan.org
http://skim.cz
© Michal Josef Špaček 2020
BSD 2-Clause License
0.03
To install Toolforge::MixNMatch::Object, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Toolforge::MixNMatch::Object
CPAN shell
perl -MCPAN -e shell install Toolforge::MixNMatch::Object
For more information on module installation, please visit the detailed CPAN module installation guide.