Template-Plugin-Calendar-Simple-0.02/ 0040775 0000764 0000764 00000000000 07775341541 016343 5 ustar jeffa jeffa Template-Plugin-Calendar-Simple-0.02/MANIFEST 0100664 0000764 0000764 00000000066 07720042636 017464 0 ustar jeffa jeffa Changes Makefile.PL MANIFEST README Simple.pm test.pl Template-Plugin-Calendar-Simple-0.02/Changes 0100664 0000764 0000764 00000000337 07775344643 017644 0 ustar jeffa jeffa Revision history for Perl extension Template::Plugin::Calendar::Simple. 0.02 Jan 01 2004 - doc updates 0.01 Aug 17 2003 - original version; created by h2xs 1.21 with options -A -X Template::Plugin::Calendar::Simple Template-Plugin-Calendar-Simple-0.02/Makefile.PL 0100664 0000764 0000764 00000000336 07720047226 020305 0 ustar jeffa jeffa use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'Template::Plugin::Calendar::Simple', 'VERSION_FROM' => 'Simple.pm', 'PREREQ_PM' => { 'Template' => '2.00', 'Calendar::Simple' => '1.04', }, ); Template-Plugin-Calendar-Simple-0.02/README 0100664 0000764 0000764 00000001004 07775344643 017221 0 ustar jeffa jeffa NAME Template::Plugin::Calendar::Simple - TT plugin for Calendar::Simple INSTALL Installation as usual: perl Makefile.PL make make test make install DESCRIPTION See perldoc Template::Plugin::Calendar::Simple DEPENDENCIES This module requires these other modules and libraries: Template-Toolkit Calendar::Simple; AUTHOR Jeffrey Hayes Anderson COPYRIGHT Copyright (c) 2004 Jeffrey Hayes Anderson. See source POD for additional copyright information. Template-Plugin-Calendar-Simple-0.02/Simple.pm 0100664 0000764 0000764 00000006074 07775344643 020144 0 ustar jeffa jeffa package Template::Plugin::Calendar::Simple; use strict; use warnings; use Calendar::Simple; use Template::Plugin; use Template::Iterator; use Template::Exception; use base qw( Template::Plugin ); our $VERSION = '0.02'; sub new { my ($class, $context, @arg) = @_; my @cal = Calendar::Simple::calendar(@arg); return bless { _CONTEXT => $context, rows => Template::Iterator->new([@cal]), days => [qw(Sun Mon Tue Wed Thu Fri Sat)], }, $class; } sub rows { my ($self) = @_; return $self->{rows}; } sub days { my ($self, $mon) = @_; my @day = @{$self->{days}}; push @day, shift @day if $mon; return [@day]; } 1; __END__ =head1 NAME Template::Plugin::Calendar::Simple - TT plugin for Calendar::Simple =head1 SYNOPSIS [% USE cal = Calendar.Simple %]
[% col || ' ' %] | [% END %]