The code I am practising with is the following:
#!/usr/bin/perl -w
use CGI qw(:standard);
use Date::Calc qw(:all);
use CGI::Carp qw(fatalsToBrowser warningsToBrowser);
use HTML::AsSubs;
use HTML::Element;
use HTML::CalendarMonth;
$c = new HTML::CalendarMonth (
month => 2,
year => 2003,
bgcolor => 'white',
);
$c->extent($c->maxrow + 2, $c->maxcol +2);
$c->all->attr(bgcolor => 'cyan');
$c->item($c->month)->wrap_content(font({size => '+2'}));
$c->item($c->year)->wrap_content(strong());
$c->cell(0,2)->attr(rowspan => 2);
$c->cell(0,2)->attr(colspan => 7);
$c->cell(0,2)->push_content(em(font({ size => +2 },
'The calendar is part',
br(),'of this table')));
print $c->as_HTML;
If I insert last_row(); after the print, for example I get the error: Undefined subroutine &main::last_row called at ./calMonth1.pl line 33.
The reason I am looking at last_row is that then I might be able to define some parameters using a conditional statement.
If you perceive that I am guessing you wouldn't be far wrong... :) |