r4338 - in /packages/libtemplate-plugin-calendar-simple-perl: ./ branches/ branches/upstream/ branches/upstream/current/ tags/

eloy at users.alioth.debian.org eloy at users.alioth.debian.org
Wed Nov 22 12:00:15 CET 2006


Author: eloy
Date: Wed Nov 22 12:00:12 2006
New Revision: 4338

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4338
Log:
[svn-inject] Installing original source of libtemplate-plugin-calendar-simple-perl

Added:
    packages/libtemplate-plugin-calendar-simple-perl/
    packages/libtemplate-plugin-calendar-simple-perl/branches/
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Changes
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/MANIFEST
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Makefile.PL
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/README
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Simple.pm
    packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/test.pl
    packages/libtemplate-plugin-calendar-simple-perl/tags/

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Changes?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Changes (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Changes Wed Nov 22 12:00:12 2006
@@ -1,0 +1,8 @@
+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

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/MANIFEST?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/MANIFEST (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/MANIFEST Wed Nov 22 12:00:12 2006
@@ -1,0 +1,6 @@
+Changes
+Makefile.PL
+MANIFEST
+README
+Simple.pm
+test.pl

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Makefile.PL?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Makefile.PL (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Makefile.PL Wed Nov 22 12:00:12 2006
@@ -1,0 +1,9 @@
+use ExtUtils::MakeMaker;
+WriteMakefile(
+    'NAME'		=> 'Template::Plugin::Calendar::Simple',
+    'VERSION_FROM'	=> 'Simple.pm',
+    'PREREQ_PM'		=> {
+	'Template'         => '2.00',
+	'Calendar::Simple' => '1.04',
+    },
+);

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/README?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/README (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/README Wed Nov 22 12:00:12 2006
@@ -1,0 +1,27 @@
+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.

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Simple.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Simple.pm?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Simple.pm (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/Simple.pm Wed Nov 22 12:00:12 2006
@@ -1,0 +1,115 @@
+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 %]
+
+  <table border="1">
+  [% FOREACH row = cal.rows %]
+     <tr>
+     [% FOREACH col = row %]
+        <td>[% col || '&nbsp;' %]</td>
+     [% END %]
+     </tr>
+  [% END %]
+  </table>
+
+=head1 DESCRIPTION
+
+This is a first stab at a Calendar::Simple plugin for Template Toolkit.
+
+=head1 METHODS
+
+=over 4
+
+=item B<rows>
+
+   [% FOREACH row = cal.rows %]
+
+Returns a Template::Iterator which contains the calendar rows.
+Each row, however, is simply an array.
+
+=item B<days>
+
+   [% FOREACH day = cal.days %]
+
+Most calendars have a header with the days - this method returns
+an array of abbreviated day names (currently only in English). If
+any argument is passed, then the week day starts with Monday instead
+of Sunday.
+
+=back
+
+=head1 BUGS
+
+If you have found a bug, typo, etc. please visit Best Practical Solution's
+CPAN bug tracker at http://rt.cpan.org:
+
+E<lt>http://rt.cpan.org/NoAuth/Bugs.html?Dist=Template-Plugin-Calendar-SimpleE<gt>
+
+or send mail to E<lt>bug-Template-Plugin-Calendar-Simple#rt.cpan.orgE<gt>
+
+(you got this far ... you can figure out how to make that
+a valid address ... and note that i won't respond to bugs
+sent to my personal address any longer)
+
+=head1 AUTHOR
+
+Jeffrey Hayes Anderson
+
+=head1 SEE ALSO
+
+L<Template::Plugin>, L<Calendar::Simple>.
+
+=head1 COPYRIGHT
+
+Copyright (c) 2004 Jeffrey Hayes Anderson.
+
+Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
+=cut

Added: packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/test.pl?rev=4338&op=file
==============================================================================
--- packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/test.pl (added)
+++ packages/libtemplate-plugin-calendar-simple-perl/branches/upstream/current/test.pl Wed Nov 22 12:00:12 2006
@@ -1,0 +1,5 @@
+use strict;
+use warnings;
+use Test::More tests => 1;
+
+require_ok('Simple');




More information about the Pkg-perl-cvs-commits mailing list