r24011 - in /branches/upstream/libpod-strip-perl: ./ current/ current/lib/ current/lib/Pod/ current/t/
dmn at users.alioth.debian.org
dmn at users.alioth.debian.org
Sat Aug 9 19:09:58 UTC 2008
Author: dmn
Date: Sat Aug 9 19:09:55 2008
New Revision: 24011
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=24011
Log:
[svn-inject] Installing original source of libpod-strip-perl
Added:
branches/upstream/libpod-strip-perl/
branches/upstream/libpod-strip-perl/current/
branches/upstream/libpod-strip-perl/current/Build.PL
branches/upstream/libpod-strip-perl/current/Changes
branches/upstream/libpod-strip-perl/current/MANIFEST
branches/upstream/libpod-strip-perl/current/META.yml
branches/upstream/libpod-strip-perl/current/Makefile.PL
branches/upstream/libpod-strip-perl/current/README
branches/upstream/libpod-strip-perl/current/TODO
branches/upstream/libpod-strip-perl/current/lib/
branches/upstream/libpod-strip-perl/current/lib/Pod/
branches/upstream/libpod-strip-perl/current/lib/Pod/Strip.pm
branches/upstream/libpod-strip-perl/current/t/
branches/upstream/libpod-strip-perl/current/t/00_load.t
branches/upstream/libpod-strip-perl/current/t/10_strip.t
branches/upstream/libpod-strip-perl/current/t/11_replace_with_comments.t
branches/upstream/libpod-strip-perl/current/t/99_pod.t
branches/upstream/libpod-strip-perl/current/t/99_pod_coverage.t
Added: branches/upstream/libpod-strip-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/Build.PL?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/Build.PL (added)
+++ branches/upstream/libpod-strip-perl/current/Build.PL Sat Aug 9 19:09:55 2008
@@ -1,0 +1,18 @@
+use strict;
+use warnings;
+use Module::Build;
+
+my $builder = Module::Build->new(
+ module_name => 'Pod::Strip',
+ license => 'perl',
+ dist_author => 'Thomas Klausner <domm at zsi.at>',
+ dist_version_from => 'lib/Pod/Strip.pm',
+ requires => {
+ 'Test::More' => 0,
+ 'Pod::Simple' => '3.00',
+ },
+ add_to_cleanup => [ 'Pod-Strip-*' ],
+ create_makefile_pl => 'traditional',
+);
+
+$builder->create_build_script();
Added: branches/upstream/libpod-strip-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/Changes?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/Changes (added)
+++ branches/upstream/libpod-strip-perl/current/Changes Sat Aug 9 19:09:55 2008
@@ -1,0 +1,35 @@
+#-----------------------------------------------------------------
+# Changes for Pod::Strip
+# $Rev: 17 $
+# $Date: 2006-03-20 21:18:35 +0100 (Mon, 20 Mar 2006) $
+#-----------------------------------------------------------------
+
+
+1.02 2006-03-20
+ - changed to 'traditional' Makefile.PL creation (easier install)
+ (suggested by Alexandre Masselot <olav at genebio.com>)
+ - clarified and updated some docs
+
+
+1.01 2005-11-07
+ - removed typo in docs (RT #15392 reported by schubiger at cpan.org)
+
+
+1.00 2004-10-05
+ - first release to CPAN
+ - added license to Build.PL
+ - some more changes in Build.PL
+
+
+0.02 2004-09-30
+ - added replace_with_comments, based on patches submitted by
+ John McNamara <jmcnamara at cpan.org>
+
+
+0.01 2004-04-29
+ - updated docs, tests, MANIFEST, etc
+
+
+0.00 2004-09-28
+- initial version, done with Module::Starter and some manual tweaking
+
Added: branches/upstream/libpod-strip-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/MANIFEST?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/MANIFEST (added)
+++ branches/upstream/libpod-strip-perl/current/MANIFEST Sat Aug 9 19:09:55 2008
@@ -1,0 +1,13 @@
+Build.PL
+Changes
+lib/Pod/Strip.pm
+Makefile.PL
+MANIFEST
+META.yml # Will be created by "make dist"
+README
+t/00_load.t
+t/10_strip.t
+t/11_replace_with_comments.t
+t/99_pod.t
+t/99_pod_coverage.t
+TODO
Added: branches/upstream/libpod-strip-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/META.yml?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/META.yml (added)
+++ branches/upstream/libpod-strip-perl/current/META.yml Sat Aug 9 19:09:55 2008
@@ -1,0 +1,15 @@
+---
+name: Pod-Strip
+version: 1.02
+author:
+ - 'Thomas Klausner <domm at zsi.at>'
+abstract: Remove POD from Perl code
+license: perl
+requires:
+ Pod::Simple: 3.00
+ Test::More: 0
+provides:
+ Pod::Strip:
+ file: lib/Pod/Strip.pm
+ version: 1.02
+generated_by: Module::Build version 0.2611
Added: branches/upstream/libpod-strip-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/Makefile.PL?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/Makefile.PL (added)
+++ branches/upstream/libpod-strip-perl/current/Makefile.PL Sat Aug 9 19:09:55 2008
@@ -1,0 +1,14 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.03
+use ExtUtils::MakeMaker;
+WriteMakefile
+(
+ 'NAME' => 'Pod::Strip',
+ 'VERSION_FROM' => 'lib/Pod/Strip.pm',
+ 'PREREQ_PM' => {
+ 'Pod::Simple' => '3.00',
+ 'Test::More' => '0'
+ },
+ 'INSTALLDIRS' => 'site',
+ 'PL_FILES' => {}
+ )
+;
Added: branches/upstream/libpod-strip-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/README?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/README (added)
+++ branches/upstream/libpod-strip-perl/current/README Sat Aug 9 19:09:55 2008
@@ -1,0 +1,19 @@
+Pod::Strip - Remove POD from Perl code
+
+Pod::Strip is a subclass of Pod::Simple that strips all POD from Perl Code.
+
+INSTALLATION
+
+To install this module, run the following commands:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
+
+COPYRIGHT AND LICENCE
+
+Copyright (C) 2004,2005,2006 Thomas Klausner, ZSI
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
Added: branches/upstream/libpod-strip-perl/current/TODO
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/TODO?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/TODO (added)
+++ branches/upstream/libpod-strip-perl/current/TODO Sat Aug 9 19:09:55 2008
@@ -1,0 +1,8 @@
+#-----------------------------------------------------------------
+# TODO
+# $Rev: 15 $
+# $Date: 2005-11-07 10:32:24 +0100 (Mon, 07 Nov 2005) $
+#-----------------------------------------------------------------
+
+
+
Added: branches/upstream/libpod-strip-perl/current/lib/Pod/Strip.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/lib/Pod/Strip.pm?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/lib/Pod/Strip.pm (added)
+++ branches/upstream/libpod-strip-perl/current/lib/Pod/Strip.pm Sat Aug 9 19:09:55 2008
@@ -1,0 +1,95 @@
+package Pod::Strip;
+
+use warnings;
+use strict;
+
+use base ('Pod::Simple');
+
+our $VERSION = "1.02";
+
+sub new {
+ my $new = shift->SUPER::new(@_);
+ $new->{_code_line}=0;
+ $new->code_handler(
+ sub {
+ # Add optional line directives
+ if ($_[2]->{_replace_with_comments}) {
+ if ($_[2]->{_code_line}+1<$_[1]) {
+ print {$_[2]{output_fh}} ("# stripped POD\n") x ($_[1] - $_[2]->{_code_line} -1 );
+ }
+ $_[2]->{_code_line}=$_[1];
+ }
+ print {$_[2]{output_fh}} $_[0],"\n";
+ return;
+ });
+ return $new;
+}
+
+
+sub replace_with_comments {
+ my $self = shift;
+ $self->{_replace_with_comments} = defined $_[0] ? $_[0] : 1;
+}
+
+
+1;
+__END__
+
+=pod
+
+=head1 NAME
+
+Pod::Strip - Remove POD from Perl code
+
+=head1 SYNOPSIS
+
+ use Pod::Strip;
+
+ my $p=Pod::Strip->new; # create parser
+ my $podless; # set output string
+ $p->output_string(\$podless); # see Pod::Simple
+ $p->parse_string_document($code); # or some other parsing method
+ # from Pod::Simple
+ # $podless will now contain code without any POD
+
+
+=head1 DESCRIPTION
+
+Pod::Strip is a subclass of Pod::Simple that strips all POD from Perl Code.
+
+=head1 METHODS
+
+All methods besides those listed here are inherited from Pod::Simple
+
+=head2 new
+
+Generate a new parser object.
+
+=head2 replace_with_comments
+
+Call this method with a true argument to replace POD with comments (looking like "# stripped POD") instead of stripping it.
+
+This has the effect that line numbers get reported correctly in error
+messages etc.
+
+=head1 AUTHOR
+
+Thomas Klausner, C<< <domm at cpan.org> >>
+
+=head1 BUGS
+
+Please report any bugs or feature requests to
+C<bug-pod-strip at rt.cpan.org>, or through the web interface at
+L<http://rt.cpan.org>. I will be notified, and then you'll automatically
+be notified of progress on your bug as I make changes.
+
+=head1 COPYRIGHT & LICENSE
+
+Copyright 2004, 2005, 2006 Thomas Klausner, All Rights Reserved.
+
+This program is free software; you can redistribute it and/or modify it
+under the same terms as Perl itself.
+
+=cut
+
+
Added: branches/upstream/libpod-strip-perl/current/t/00_load.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/t/00_load.t?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/t/00_load.t (added)
+++ branches/upstream/libpod-strip-perl/current/t/00_load.t Sat Aug 9 19:09:55 2008
@@ -1,0 +1,6 @@
+use Test::More tests => 1;
+
+BEGIN {
+use_ok( 'Pod::Strip' );
+}
+
Added: branches/upstream/libpod-strip-perl/current/t/10_strip.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/t/10_strip.t?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/t/10_strip.t (added)
+++ branches/upstream/libpod-strip-perl/current/t/10_strip.t Sat Aug 9 19:09:55 2008
@@ -1,0 +1,38 @@
+use Test::More tests => 4;
+use Pod::Strip;
+
+
+{
+ my $code=<<'EOCODE';
+
+=pod
+
+the great hello world script
+
+=cut
+
+# print it
+print "Hello, world!\n";
+EOCODE
+ my $podless;
+ my $p=Pod::Strip->new;
+ $p->output_string(\$podless);
+ $p->parse_string_document($code);
+ is ($podless,'
+
+# print it
+print "Hello, world!\n";
+','pod stripped');
+}
+
+{
+ my $podless;
+ my $p=Pod::Strip->new;
+ $p->output_string(\$podless);
+ $p->parse_file('lib/Pod/Strip.pm');
+
+ unlike($podless,qr/Thomas Klausner/i);
+ unlike($podless,qr/Synopsos/i);
+ unlike($podless,qr/a new parser object/i);
+
+ }
Added: branches/upstream/libpod-strip-perl/current/t/11_replace_with_comments.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/t/11_replace_with_comments.t?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/t/11_replace_with_comments.t (added)
+++ branches/upstream/libpod-strip-perl/current/t/11_replace_with_comments.t Sat Aug 9 19:09:55 2008
@@ -1,0 +1,65 @@
+use Test::More tests => 2;
+use Pod::Strip;
+
+
+{
+ my $code=<<'EOCODE';
+#!/usr/bin/perl
+
+
+=pod
+
+the great hello world script
+
+including lots of POD
+
+=cut
+
+# print it
+print "Hello, world!\n";
+
+exit "done";
+
+=pod
+
+more pod
+
+=cut
+
+EOCODE
+ my $podless;
+ my $p=Pod::Strip->new;
+ $p->replace_with_comments(1);
+
+ is($p->replace_with_comments(),1);
+
+
+ $p->output_string(\$podless);
+ $p->parse_string_document($code);
+
+ is ($podless,
+'#!/usr/bin/perl
+
+
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+
+# print it
+print "Hello, world!\n";
+
+exit "done";
+
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+# stripped POD
+
+','pod stripped');
+}
+
Added: branches/upstream/libpod-strip-perl/current/t/99_pod.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/t/99_pod.t?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/t/99_pod.t (added)
+++ branches/upstream/libpod-strip-perl/current/t/99_pod.t Sat Aug 9 19:09:55 2008
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod 1.14";
+plan skip_all => "Test::Pod 1.14 required for testing POD" if $@;
+all_pod_files_ok();
Added: branches/upstream/libpod-strip-perl/current/t/99_pod_coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libpod-strip-perl/current/t/99_pod_coverage.t?rev=24011&op=file
==============================================================================
--- branches/upstream/libpod-strip-perl/current/t/99_pod_coverage.t (added)
+++ branches/upstream/libpod-strip-perl/current/t/99_pod_coverage.t Sat Aug 9 19:09:55 2008
@@ -1,0 +1,6 @@
+#!perl -T
+
+use Test::More;
+eval "use Test::Pod::Coverage 1.04";
+plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@;
+all_pod_coverage_ok();
More information about the Pkg-perl-cvs-commits
mailing list