r4755 - in /packages/libtemplate-plugin-textile2-perl: ./ branches/ branches/upstream/ branches/upstream/current/ branches/upstream/current/lib/ branches/upstream/current/lib/Template/ branches/upstream/current/lib/Template/Plugin/ branches/upstream/current/t/ tags/

jaldhar at users.alioth.debian.org jaldhar at users.alioth.debian.org
Sun Jan 21 07:58:26 CET 2007


Author: jaldhar
Date: Sun Jan 21 07:58:25 2007
New Revision: 4755

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

Added:
    packages/libtemplate-plugin-textile2-perl/
    packages/libtemplate-plugin-textile2-perl/branches/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Build.PL
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Changes
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/MANIFEST
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/META.yml
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Makefile.PL
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/README
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/Textile2.pm
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/
    packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/Template-Plugin-Textile2.t
    packages/libtemplate-plugin-textile2-perl/tags/

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Build.PL?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Build.PL (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Build.PL Sun Jan 21 07:58:25 2007
@@ -1,0 +1,19 @@
+use strict;
+use Module::Build;
+
+my %arguments = (
+    #create_makefile_pl => 'passthrough',
+    create_makefile_pl  => 'traditional',
+    license            => 'perl',
+    module_name        => 'Template::Plugin::Textile2',
+    requires           => {
+        'Template'          => 2.15,
+        'Text::Textile'     => 2.03,
+    },
+    build_requires      => {
+#        'Test::Exception'   => 0
+    },
+);
+
+my $build = Module::Build->new(%arguments);
+$build->create_build_script();

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Changes?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Changes (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Changes Sun Jan 21 07:58:25 2007
@@ -1,0 +1,7 @@
+Revision history for Perl extension Template::Plugin::Textile.
+
+1.21  Thu Nov 30 2006
+    - doc & Changes fixes
+
+1.20  Thu Nov 30 2006
+    - inital release

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/MANIFEST?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/MANIFEST (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/MANIFEST Sun Jan 21 07:58:25 2007
@@ -1,0 +1,8 @@
+Changes
+Makefile.PL
+Build.PL
+MANIFEST
+README
+t/Template-Plugin-Textile2.t
+lib/Template/Plugin/Textile2.pm
+META.yml                                 Module meta-data (added by MakeMaker)

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/META.yml?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/META.yml (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/META.yml Sun Jan 21 07:58:25 2007
@@ -1,0 +1,20 @@
+---
+name: Template-Plugin-Textile2
+version: 1.21
+author:
+  - Michele Beltrame C<mb at italpro.net>.
+abstract: Use Textile formatting with Template Toolkit
+license: perl
+resources:
+  license: http://dev.perl.org/licenses/
+requires:
+  Template: 2.15
+  Text::Textile: 2.03
+provides:
+  Template::Plugin::Textile2:
+    file: lib/Template/Plugin/Textile2.pm
+    version: 1.21
+generated_by: Module::Build version 0.2805
+meta-spec:
+  url: http://module-build.sourceforge.net/META-spec-v1.2.html
+  version: 1.2

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Makefile.PL?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Makefile.PL (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/Makefile.PL Sun Jan 21 07:58:25 2007
@@ -1,0 +1,15 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+          'NAME' => 'Template::Plugin::Textile2',
+          'VERSION_FROM' => 'lib/Template/Plugin/Textile2.pm',
+          'PREREQ_PM' => {
+                           'Template' => '2.15',
+                           'Text::Textile' => '2.03'
+                         },
+          'INSTALLDIRS' => 'site',
+          'EXE_FILES' => [],
+          'PL_FILES' => {}
+        )
+;

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/README?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/README (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/README Sun Jan 21 07:58:25 2007
@@ -1,0 +1,37 @@
+Image-VisualConfirmation version 0.01
+=====================================
+
+This module aims at making the creation of visual confirmation images
+simple. For who doesn't know, these are the funky images from which
+you have to copy the text when submitting a form. Their function is
+to avoid robots spamming web forms, and they work quite good even
+though spammers' OCR software is becoming increasingly good.
+
+This modle is mainly used in a web application context, in conjuction
+with such modules as or with a web framework such as Catalyst.
+
+INSTALLATION
+
+To install this module type the following:
+
+   perl Makefile.PL
+   make
+   make test
+   make install
+
+DEPENDENCIES
+
+This module requires these other modules and libraries:
+
+  Imager
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2006 by Michele Beltrame <mb at italpro.net>
+
+This library is free software, you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+The Bitstream Vera font bundled with this distribution is copyrighted
+by Bitstream ( http://www.bitstream.com ) and distributed under its
+license terms.

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/Textile2.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/Textile2.pm?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/Textile2.pm (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/lib/Template/Plugin/Textile2.pm Sun Jan 21 07:58:25 2007
@@ -1,0 +1,111 @@
+package Template::Plugin::Textile2;
+
+use strict;
+use warnings;
+use Template::Plugin::Filter;
+use Text::Textile;
+
+our $VERSION = "1.21";
+
+use base qw/Template::Plugin::Filter/;
+
+sub init {
+    my ($self, $args) = @_;
+
+    die 'Args must be an hashref'
+        if (defined $args) && (ref $args ne 'HASH');
+    
+    $self-> { _FORMAT_MODE }
+        = $args->{format_mode} || 'default';
+    delete $args->{format_mode};        
+
+    $self->{ _TEXTILE } = Text::Textile->new(
+        %$args
+    );
+
+    my $name = $self->{ _CONFIG }->{ name } || 'textile2';
+    $self->install_filter($name);
+
+    return $self;
+}
+
+sub filter {
+    my ($self, $text) = @_;
+
+    if ( $self->{_FORMAT_MODE} eq 'inline' ) {    
+        return $self->{_TEXTILE}->format_inline(text => $text);
+    }
+    else {
+        return $self->{_TEXTILE}->process($text);
+    }
+}
+
+1;
+
+__END__
+
+=head1 NAME
+
+Template::Plugin::Textile2 - Use Textile formatting with Template Toolkit
+
+=head1 SYNOPSIS
+
+  [% USE Textile2 -%]
+  [% FILTER textile2 %]This *bold* and this is _italic_.[% END %]
+
+  <p>this is <strong>bold</strong> and this is <em>italic</em>.
+
+
+  [% USE Textile2 ( disable_html => 1 ) -%]
+  [% FILTER textile2 %]this is<br /> _italic_.[% END %]
+
+  <p>this is&lt;br /&gt; <em>italic</em>.</p>
+
+=head1 DESCRIPTION
+
+This module wraps Text::Textile into a plugin Template Toolkit.  It
+provides a filter named C<textile2>.
+This aims to be a more feature-full version L<Template::Plugin::Textile>,
+by allowing you to pass parameters to L<Text::Textile>. 
+
+Use this way:
+
+    [% FILTER textile2 %]
+    Reasons to use the Template Toolkit:
+
+    * Seperation of concerns.
+    * It's written in Perl.
+    * Badgers are Still Cool.
+    [% END %]
+
+or:
+
+    [% mytext | textile2 %]
+
+You can pass the same options you would pass to Text::Textile, directly
+when using the template. For instance to disable processing of HTML
+tags you can do:
+
+    [% USE Textile2 ( disable_html => 1 ) %]
+
+To avoid your text to be wrapped into C<&lt;p&gt...&lt;/p&gt> you can
+use:
+
+    [% USE Textile2 ( format_mode => 'inline' ) %]
+
+See L<Text::Textile> for details.
+
+=head1 AUTHOR
+
+Michele Beltrame C<mb at italpro.net>.
+
+=head1 LICENSE
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=head1 SEE ALSO
+
+L<Text::Textile>, L<Template>
+
+=cut

Added: packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/Template-Plugin-Textile2.t
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/Template-Plugin-Textile2.t?rev=4755&op=file
==============================================================================
--- packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/Template-Plugin-Textile2.t (added)
+++ packages/libtemplate-plugin-textile2-perl/branches/upstream/current/t/Template-Plugin-Textile2.t Sun Jan 21 07:58:25 2007
@@ -1,0 +1,31 @@
+use Test::More tests => 1;
+
+use strict;
+use Template;
+
+# ### Basic Textile ####
+
+my $template_source = "
+[%- USE Textile2 -%]
+[%- FILTER textile2 -%]
+This is *bold* and this is _italic_.
+[%- END -%]
+";
+
+my $t = Template->new();
+
+my $output;
+$t->process(\$template_source, undef, \$output) or die "Can't process template";
+
+ok( $output eq '<p>This is <strong>bold</strong> and this is <em>italic</em>.</p>' );
+
+# ### No-HTML ###
+
+#TODO
+
+# ### Inline ####
+
+#TODO
+
+1;
+




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