[fayland commit] r960 - in trunk/CPAN/Template-Plugin-Dumper-Perltidy: . lib lib/Template lib/Template/Plugin lib/...

2 views
Skip to first unread message

codesite...@google.com

unread,
Feb 18, 2009, 9:43:22 AM2/18/09
to fay...@googlegroups.com
Author: fayland
Date: Wed Feb 18 05:16:56 2009
New Revision: 960

Added:
trunk/CPAN/Template-Plugin-Dumper-Perltidy/
trunk/CPAN/Template-Plugin-Dumper-Perltidy/Changes
trunk/CPAN/Template-Plugin-Dumper-Perltidy/Makefile.PL
trunk/CPAN/Template-Plugin-Dumper-Perltidy/README
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/Plugin/
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/Plugin/Dumper/

trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/Plugin/Dumper/Perltidy.pm
trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/
trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/00-load.t
trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/01-baisc.t
trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/pod.t

Log:
new Template-Plugin-Dumper-Perltidy

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/Changes
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/Changes Wed Feb 18 05:16:56
2009
@@ -0,0 +1,5 @@
+Revision history for Template-Plugin-Dumper-Perltidy
+
+0.01 Date/time
+ First version, released on an unsuspecting world.
+

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/Makefile.PL
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/Makefile.PL Wed Feb 18
05:16:56 2009
@@ -0,0 +1,16 @@
+use inc::Module::Install;
+
+name 'Template-Plugin-Dumper-Perltidy';
+all_from 'lib/Template/Plugin/Dumper/Perltidy.pm';
+author 'Fayland Lam <fay...@gmail.com>';
+license 'perl';
+
+requires 'Template';
+requires 'Data::Dumper::Perltidy';
+
+build_requires 'Test::More';
+
+auto_install;
+
+WriteAll;
+

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/README
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/README Wed Feb 18 05:16:56
2009
@@ -0,0 +1,52 @@
+Template-Plugin-Dumper-Perltidy
+
+The README is used to introduce the module and provide instructions on
+how to install the module, any machine dependencies it may have (for
+example C compilers and installed libraries) and any other information
+that should be provided before the module is installed.
+
+A README file is required for CPAN modules since CPAN extracts the README
+file from a module distribution so that people browsing the archive
+can use it to get an idea of the module's uses. It is usually a good idea
+to provide version information here so that people can decide whether
+fixes for the module are worth downloading.
+
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+SUPPORT AND DOCUMENTATION
+
+After installing, you can find documentation for this module with the
+perldoc command.
+
+ perldoc Template::Plugin::Dumper::Perltidy
+
+You can also look for information at:
+
+ RT, CPAN's request tracker
+
http://rt.cpan.org/NoAuth/Bugs.html?Dist=Template-Plugin-Dumper-Perltidy
+
+ AnnoCPAN, Annotated CPAN documentation
+ http://annocpan.org/dist/Template-Plugin-Dumper-Perltidy
+
+ CPAN Ratings
+ http://cpanratings.perl.org/d/Template-Plugin-Dumper-Perltidy
+
+ Search CPAN
+ http://search.cpan.org/dist/Template-Plugin-Dumper-Perltidy/
+
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2009 Fayland Lam
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+

Added:
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/Plugin/Dumper/Perltidy.pm
==============================================================================
--- (empty file)
+++
trunk/CPAN/Template-Plugin-Dumper-Perltidy/lib/Template/Plugin/Dumper/Perltidy.pm
Wed Feb 18 05:16:56 2009
@@ -0,0 +1,57 @@
+package Template::Plugin::Dumper::Perltidy;
+
+use warnings;
+use strict;
+
+our $VERSION = '0.01';
+
+use base 'Template::Plugin';
+use Data::Dumper::Perltidy;
+
+sub new {
+ my $class = shift;
+ my $context = shift;
+ bless {
+ context => $context,
+ }, $class;
+}
+
+sub dump {
+ my $self = shift;
+ my $content = Dumper(@_);
+ return $content;
+}
+
+1;
+__END__
+
+=head1 NAME
+
+Template::Plugin::Dumper::Perltidy - Template Toolkit plugin interface to
Data::Dumper::Perltidy
+
+=head1 SYNOPSIS
+
+ [% USE Dumper = Dumper::Perltidy %]
+
+ [% Dumper.dump(myvar) %]
+
+=head1 DESCRIPTION
+
+A very simple Template Toolkit Plugin Interface to the
L<Data::Dumper::Perltidy> module.
+
+The Data::Dumper::Perltidy module is "Stringify and pretty print Perl data
structures." like L<Data::Dumper>.
+
+=head1 SEE ALSO
+
+L<Template>, L<Data::Dumper::Perltidy>, L<Template::Plugin::Dumper>
+
+=head1 AUTHOR
+
+Fayland Lam, C<< <fayland at gmail.com> >>
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2009 Fayland Lam, all rights reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/00-load.t
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/00-load.t Wed Feb 18
05:16:56 2009
@@ -0,0 +1,9 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+BEGIN {
+ use_ok( 'Template::Plugin::Dumper::Perltidy' );
+}
+
+diag( "Testing Template::Plugin::Dumper::Perltidy
$Template::Plugin::Dumper::Perltidy::VERSION, Perl $], $^X" );

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/01-baisc.t
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/01-baisc.t Wed Feb 18
05:16:56 2009
@@ -0,0 +1,31 @@
+#!perl -T
+
+use Test::More tests => 1;
+
+use Template;
+use Template::Plugin::Dumper::Perltidy;
+
+my $tt = Template->new;
+my $template = <<'TEMPLATE';
+[% USE Dumper = Dumper::Perltidy %]
+[% myvar = [{ title => 'This is a test header' },{ data_range =>
+ [ 0, 0, 3, 9 ] },{ format => 'bold' }] %]
+[% Dumper.dump(myvar) %]
+TEMPLATE
+my $out;
+$tt->process(\$template, {}, \$out)
+ or die $tt->error;
+my $val = <<'OUT';
+$VAR1 = [
+ { 'title' => 'This is a test header' },
+ { 'data_range' => [ 0, 0, 3, 9 ] },
+ { 'format' => 'bold' }
+];
+OUT
+
+$out =~ s/(^\s+|\s+$)//g;
+$val =~ s/(^\s+|\s+$)//g;
+
+is $out, $val;
+
+1;
\ No newline at end of file

Added: trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/pod.t
==============================================================================
--- (empty file)
+++ trunk/CPAN/Template-Plugin-Dumper-Perltidy/t/pod.t Wed Feb 18 05:16:56
2009
@@ -0,0 +1,12 @@
+#!perl -T
+
+use strict;
+use warnings;
+use Test::More;
+
+# Ensure a recent version of Test::Pod
+my $min_tp = 1.22;
+eval "use Test::Pod $min_tp";
+plan skip_all => "Test::Pod $min_tp required for testing POD" if $@;
+
+all_pod_files_ok();

Reply all
Reply to author
Forward
0 new messages