# Below is stub documentation for your module. You'd better edit it! =head1 NAME HTML::Pen::Iterator - Creating a calendar using a Pen Iterator =head1 SYNOPSIS <: &do( 'festival.pl' )> <: &iterator( *events, $festival )> <: &iterator( *active, $$festival[1] )> <: &block( *HEADER, 'endblock' )> <: &iteratorValue( *active, 'weekday' )> endblock <: &block( *WEEK, 'endblock' )> <: &undef( $#$events = 6 )> <: &iterate( *events, @DAY )> endblock <: &block( *DAY, 'endblock' )>
<: &iteratorValue( *events, 'monthday' )>
<: &iterate( *events, @HOUR )>
endblock <: &block( *HOUR, 'endblock' )>
<: &iteratorValue( *events, 'timedisplay' )>
<: &iterate( *events, @EVENT )> endblock <: &block( *EVENT, 'endblock' )>
<: &iteratorValue( *events,'event' )>
endblock <: &iterate( *active, @HEADER )> <: &iterate( *events, @WEEK )>
<: &iteratorValue( *active, 'monthname' )> <: &iteratorValue( *active, 'year' )>
=head1 DESCRIPTION This code generates an HTML table representing an event calendar. Here's a quick walkthrough of the Pen code: C<$festival>, defined in C, (see L) is a reference to a four dimensional array. It's structure is defined as: \@weeks -> \@days -> \@times -> \@events -> \%eventobjects C<$festival> data is represented by the iterator C<*events>, which contains five weeks. The first complete week, C<< $festival->[1] >>, is represented by seven days in the C<*active> iterator. This iterator is used to look up the I and I name properties. The I<@HEADER> block, which display the weekday nmes in the second row, is not recursive. The I<@WEEK> block, which displays the remaining five rows, is recursive to four blocks deep. @WEEK -> @DAY -> @HOUR -> @EVENT =head1 OUTPUT L =head1 AUTHOR Jim Schueler, Ejim@tqis.comE =head1 COPYRIGHT AND LICENSE Copyright (C) 2011 by Jim Schueler This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.9 or, at your option, any later version of Perl 5 you may have available. =cut