r43082 - in /branches/upstream/libtext-greeking-perl/current: ./ lib/Text/ t/
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Fri Aug 28 01:33:40 UTC 2009
Author: jawnsy-guest
Date: Fri Aug 28 01:33:34 2009
New Revision: 43082
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=43082
Log:
[svn-upgrade] Integrating new upstream version, libtext-greeking-perl (0.12)
Added:
branches/upstream/libtext-greeking-perl/current/.gitignore
branches/upstream/libtext-greeking-perl/current/.perltidyrc
branches/upstream/libtext-greeking-perl/current/CHANGES
branches/upstream/libtext-greeking-perl/current/MANIFEST.SKIP
branches/upstream/libtext-greeking-perl/current/t/
branches/upstream/libtext-greeking-perl/current/t/01_compile.t
branches/upstream/libtext-greeking-perl/current/t/90_perltidy.t
branches/upstream/libtext-greeking-perl/current/t/96_manifest.t
branches/upstream/libtext-greeking-perl/current/t/97_meta.t
branches/upstream/libtext-greeking-perl/current/t/98_pod_syntax.t
branches/upstream/libtext-greeking-perl/current/t/99_pod_coverage.t
Removed:
branches/upstream/libtext-greeking-perl/current/Changes
branches/upstream/libtext-greeking-perl/current/test.pl
Modified:
branches/upstream/libtext-greeking-perl/current/MANIFEST
branches/upstream/libtext-greeking-perl/current/META.yml
branches/upstream/libtext-greeking-perl/current/Makefile.PL
branches/upstream/libtext-greeking-perl/current/README
branches/upstream/libtext-greeking-perl/current/lib/Text/Greeking.pm
Added: branches/upstream/libtext-greeking-perl/current/.gitignore
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/.gitignore?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/.gitignore (added)
+++ branches/upstream/libtext-greeking-perl/current/.gitignore Fri Aug 28 01:33:34 2009
@@ -1,0 +1,6 @@
+.DS_Store
+Makefile.old
+Makefile
+blib/
+pm_to_blib
+*.bak
Added: branches/upstream/libtext-greeking-perl/current/.perltidyrc
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/.perltidyrc?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/.perltidyrc (added)
+++ branches/upstream/libtext-greeking-perl/current/.perltidyrc Fri Aug 28 01:33:34 2009
@@ -1,0 +1,37 @@
+# Thanks to the Mojo team for an excellent .perltidyrc
+# From http://github.com/kraih/mojo/blob/685a370c882b1e7f22fde88f00eb222c14cbb2c2/.perltidyrc
+# Perl Best Practices (plus errata) .perltidyrc file
+
+-l=98 # Max line width is 98 cols
+-i=4 # Indent level is 4 cols
+-ci=4 # Continuation indent is 4 cols
+#-st # Output to STDOUT
+-se # Errors to STDERR
+-vt=2 # Maximal vertical tightness
+-cti=0 # No extra indentation for closing brackets
+-pt=1 # Medium parenthesis tightness
+-bt=1 # Medium brace tightness
+-sbt=1 # Medium square bracket tightness
+-bbt=1 # Medium block brace tightness
+-nsfs # No space before semicolons
+-nolq # Don't outdent long quoted strings
+-wbb="% + - * / x != == >= <= =~ < > | & **= += *= &= <<= &&= -= /= |= >>= ||= .= %= ^= x="
+ # Break before all operators
+
+# extras/overrides/deviations from PBP
+
+--maximum-line-length=78 # be less generous
+--warning-output # Show warnings
+--maximum-consecutive-blank-lines=2 # default is 1
+--nohanging-side-comments # troublesome for commented out code
+
+-isbc # block comments may only be indented if they have some space characters before the #
+-ci=2 # Continuation indent is 2 cols
+
+# we use version control, so just rewrite the file
+-b
+
+# for the up-tight folk :)
+-pt=2 # High parenthesis tightness
+-bt=2 # High brace tightness
+-sbt=2 # High square bracket tightness
Added: branches/upstream/libtext-greeking-perl/current/CHANGES
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/CHANGES?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/CHANGES (added)
+++ branches/upstream/libtext-greeking-perl/current/CHANGES Fri Aug 28 01:33:34 2009
@@ -1,0 +1,14 @@
+Revision history for Perl extension Text::Greeking;
+
+0.12 Aug 27 2009
+ - Applied patch to fix busted POD formatting. (Christine Spang)
+ - Added proper standard units tests
+ - Added lots of meta to Makefile.PL
+ - Updated contact and copyright information
+ - Ran perltidy of code
+
+0.11 Mar 13 2005
+ - Fixed botched distribution.
+
+0.1 Mar 13 2005
+ - Initial release into CPAN.
Modified: branches/upstream/libtext-greeking-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/MANIFEST?rev=43082&op=diff
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/MANIFEST (original)
+++ branches/upstream/libtext-greeking-perl/current/MANIFEST Fri Aug 28 01:33:34 2009
@@ -1,7 +1,15 @@
-Changes
+.gitignore
+.perltidyrc
+CHANGES
lib/Text/Greeking.pm
Makefile.PL
-MANIFEST
+MANIFEST This list of files
+MANIFEST.SKIP
+META.yml
README
-test.pl
-META.yml Module meta-data (added by MakeMaker)
+t/01_compile.t
+t/90_perltidy.t
+t/96_manifest.t
+t/97_meta.t
+t/98_pod_syntax.t
+t/99_pod_coverage.t
Added: branches/upstream/libtext-greeking-perl/current/MANIFEST.SKIP
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/MANIFEST.SKIP?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/MANIFEST.SKIP (added)
+++ branches/upstream/libtext-greeking-perl/current/MANIFEST.SKIP Fri Aug 28 01:33:34 2009
@@ -1,0 +1,11 @@
+\.git[^i]
+\.old$
+\.bak$
+^build
+#^MANIFEST
+^Makefile$
+#^t\b
+test
+^\._
+blib
+pm_to_blib
Modified: branches/upstream/libtext-greeking-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/META.yml?rev=43082&op=diff
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/META.yml (original)
+++ branches/upstream/libtext-greeking-perl/current/META.yml Fri Aug 28 01:33:34 2009
@@ -1,9 +1,26 @@
-#XXXXXXX This is a prototype!!! It will change in the future!!! XXXXX#
-name: Text-Greeking
-version: 0.11
-version_from: lib/Text/Greeking.pm
-installdirs: site
+--- #YAML:1.0
+name: Text-Greeking
+version: 0.12
+abstract: a module for generating meaningless text
+author:
+ - Timothy Appnel <tima at cpan.org>
+license: perl
+distribution_type: module
+configure_requires:
+ ExtUtils::MakeMaker: 0
+build_requires:
+ ExtUtils::MakeMaker: 0
requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.12
+ perl: 5.006
+resources:
+ bugtracker: http://rt.cpan.org/Public/Dist/Display.html?Name=Text-Greeking
+ license: http://dev.perl.org/licenses/
+ repository: http://github.com/tima/perl-text-greeking
+no_index:
+ directory:
+ - t
+ - inc
+generated_by: ExtUtils::MakeMaker version 6.54
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
Modified: branches/upstream/libtext-greeking-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/Makefile.PL?rev=43082&op=diff
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/Makefile.PL (original)
+++ branches/upstream/libtext-greeking-perl/current/Makefile.PL Fri Aug 28 01:33:34 2009
@@ -1,7 +1,20 @@
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
+use strict;
+
WriteMakefile(
- 'NAME' => 'Text::Greeking',
- 'VERSION_FROM' => 'lib/Text/Greeking.pm', # finds $VERSION
+ 'NAME' => 'Text::Greeking',
+ 'VERSION_FROM' => 'lib/Text/Greeking.pm',
+ 'ABSTRACT_FROM' => 'lib/Text/Greeking.pm',
+ 'MIN_PERL_VERSION' => '5.006',
+ 'LICENSE' => 'perl',
+ 'AUTHOR' => 'Timothy Appnel <tima at cpan.org>',
+ 'PREREQ_PM' => {},
+ 'META_MERGE' => {
+ 'resources' => {
+ 'license' => 'http://dev.perl.org/licenses/',
+ 'repository' => 'http://github.com/tima/perl-text-greeking',
+ 'bugtracker' =>
+ 'http://rt.cpan.org/Public/Dist/Display.html?Name=Text-Greeking',
+ },
+ },
);
Modified: branches/upstream/libtext-greeking-perl/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/README?rev=43082&op=diff
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/README (original)
+++ branches/upstream/libtext-greeking-perl/current/README Fri Aug 28 01:33:34 2009
@@ -16,4 +16,5 @@
terms of the Artistic License are described at
http://www.perl.com/language/misc/Artistic.html. Except
where otherwise noted, Text::Greeking is Copyright
-2005, Timothy Appnel, tima at cpan.org. All rights reserved.
+2005-2009, Timothy Appnel, tima at cpan.org. All rights
+reserved.
Modified: branches/upstream/libtext-greeking-perl/current/lib/Text/Greeking.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/lib/Text/Greeking.pm?rev=43082&op=diff
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/lib/Text/Greeking.pm (original)
+++ branches/upstream/libtext-greeking-perl/current/lib/Text/Greeking.pm Fri Aug 28 01:33:34 2009
@@ -3,15 +3,15 @@
use warnings;
use vars qw( $VERSION );
-$VERSION = 0.11;
+$VERSION = 0.12;
# make controllable eventually.
-my @punc = split('', '..........??!');
-my @inpunc = split('',',,,,,,,,,,;;:');
+my @punc = split('', '..........??!');
+my @inpunc = split('', ',,,,,,,,,,;;:');
push @inpunc, ' --';
sub new {
- my $class =shift;
+ my $class = shift;
my $self = bless {}, $class;
srand;
$self->init;
@@ -19,22 +19,22 @@
sub init {
$_[0]->sources([]);
- $_[0]->paragraphs(2,8);
- $_[0]->sentences(2,8);
- $_[0]->words(5,15);
+ $_[0]->paragraphs(2, 8);
+ $_[0]->sentences(2, 8);
+ $_[0]->words(5, 15);
$_[0];
}
-sub sources {
+sub sources {
$_[0]->{sources} = $_[1] if defined $_[1];
$_[0]->{sources};
}
sub add_source {
- my($self,$text) = @_;
+ my ($self, $text) = @_;
return unless $text;
- $text =~s/[\n\r]/ /g;
- $text =~s/[[:punct:]]//g;
+ $text =~ s/[\n\r]/ /g;
+ $text =~ s/[[:punct:]]//g;
my @words = map { lc $_ } split /\s+/, $text;
push @{$self->{sources}}, \@words;
}
@@ -44,34 +44,37 @@
my $out;
$self->_load_default_source unless defined $self->{sources}->[0];
my @words = @{$self->{sources}->[int(rand(@{$self->{sources}}))]};
- my($paramin,$paramax) = @{$self->{paragraphs}};
- my($sentmin,$sentmax) = @{$self->{sentences}};
- my($phramin,$phramax) = @{$self->{words}};
- my $pcount = int(rand($paramax-$paramin+1)+$paramin);
- for (my $x=0; $x < $pcount; $x++) {
+ my ($paramin, $paramax) = @{$self->{paragraphs}};
+ my ($sentmin, $sentmax) = @{$self->{sentences}};
+ my ($phramin, $phramax) = @{$self->{words}};
+ my $pcount = int(rand($paramax - $paramin + 1) + $paramin);
+
+ for (my $x = 0; $x < $pcount; $x++) {
my $p;
- my $scount = int(rand($sentmax-$sentmin+1)+$sentmin);
- for (my $y=0; $y < $scount; $y++) {
+ my $scount = int(rand($sentmax - $sentmin + 1) + $sentmin);
+ for (my $y = 0; $y < $scount; $y++) {
my $s;
- my $wcount = int(rand($phramax-$phramin+1)+$phramin);
- for (my $w=0; $w < $wcount; $w++) {
+ my $wcount = int(rand($phramax - $phramin + 1) + $phramin);
+ for (my $w = 0; $w < $wcount; $w++) {
my $word = $words[int(rand(@words))];
- $s .= $s ? " $word" : ucfirst($word);
- $s .= (($w+1 < $wcount) && !int(rand(10))) ?
- $inpunc[int(rand(@inpunc))] : '';
+ $s .= $s ? " $word" : ucfirst($word);
+ $s .=
+ (($w + 1 < $wcount) && !int(rand(10)))
+ ? $inpunc[int(rand(@inpunc))]
+ : '';
}
$s .= $punc[int(rand(@punc))];
$p .= ' ' if $p;
$p .= $s;
- }
- $out .= $p."\n\n"; # assumes text.
+ }
+ $out .= $p . "\n\n"; # assumes text.
}
$out;
}
-sub paragraphs { $_[0]->{paragraphs} = [ $_[1], $_[2] ] }
-sub sentences { $_[0]->{sentences} = [ $_[1], $_[2] ] }
-sub words { $_[0]->{words} = [ $_[1], $_[2] ] }
+sub paragraphs { $_[0]->{paragraphs} = [$_[1], $_[2]] }
+sub sentences { $_[0]->{sentences} = [$_[1], $_[2]] }
+sub words { $_[0]->{words} = [$_[1], $_[2]] }
sub _load_default_source {
my $text = <<TEXT;
@@ -113,7 +116,7 @@
__END__
-=begin
+=begin pod
=head1 NAME
@@ -160,6 +163,12 @@
Constructor method. Returns a new instance of the class.
+=item $g->init
+
+Initializes object with defaults. Called by the constructor.
+Broken out for easy overloading to enable customized
+defaults and other behaviour.
+
=item $g->sources([\@ARRAY])
Gets/sets the table of source word collections current in
@@ -211,6 +220,14 @@
=back
+=head1 PARTICIPATION
+
+I welcome and accept patches in diff format. If you wish to
+hack on this code, please fork the git repository found at:
+L<http://github.com/tima/perl-text-greeking/>. If you have
+something to push back to my repository, just use the "pull
+request" button on the github site.
+
=head1 LICENSE
The software is released under the Artistic License. The
@@ -219,10 +236,10 @@
=head1 AUTHOR & COPYRIGHT
-Except where otherwise noted, Text::Greeking is
-Copyright 2005, Timothy Appnel, tima at cpan.org. All rights
+Except where otherwise noted, Text::Greeking is Copyright
+2005-2009, Timothy Appnel, tima at cpan.org. All rights
reserved.
=cut
-=end
+=end pod
Added: branches/upstream/libtext-greeking-perl/current/t/01_compile.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/01_compile.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/01_compile.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/01_compile.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,11 @@
+#!perl
+
+# Tests that the Text::Greeking package compiles
+
+use strict;
+use warnings;
+use Test::More tests => 2;
+
+ok($] >= 5.0061, "Your perl is new enough");
+
+use_ok('Text::Greeking');
Added: branches/upstream/libtext-greeking-perl/current/t/90_perltidy.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/90_perltidy.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/90_perltidy.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/90_perltidy.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,23 @@
+#!perl
+
+# Test that our code has been tidied
+
+use strict;
+use warnings;
+use Test::More;
+
+my $MODULE = 'Test::PerlTidy';
+
+# Don't run tests for installs
+unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) {
+ plan(skip_all => "Author tests not required for installation");
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ($@) {
+ $ENV{RELEASE_TESTING}
+ ? die("Failed to load required release-testing module $MODULE")
+ : plan(skip_all => "$MODULE not available for testing");
+}
+run_tests();
Added: branches/upstream/libtext-greeking-perl/current/t/96_manifest.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/96_manifest.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/96_manifest.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/96_manifest.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,26 @@
+#!perl
+
+# Test that our MANIFEST file is accurate
+
+use strict;
+use warnings;
+use Test::More;
+
+# $ENV{MANIFEST_WARN_ONLY} = 1;
+# export MANIFEST_WARN_ONLY=1;
+
+my $MODULE = 'Test::DistManifest';
+
+# Don't run tests for installs
+unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) {
+ plan(skip_all => "Author tests not required for installation");
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ($@) {
+ $ENV{RELEASE_TESTING}
+ ? die("Failed to load required release-testing module $MODULE")
+ : plan(skip_all => "$MODULE not available for testing");
+}
+manifest_ok('MANIFEST', 'MANIFEST.SKIP');
Added: branches/upstream/libtext-greeking-perl/current/t/97_meta.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/97_meta.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/97_meta.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/97_meta.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,24 @@
+#!perl
+
+# Test that our META.yml file matches the current specification.
+
+use strict;
+use warnings;
+use Test::More;
+
+my $MODULE = 'Test::CPAN::Meta 0.12';
+
+# Don't run tests for installs
+unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) {
+ plan(skip_all => "Author tests not required for installation");
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ($@) {
+ $ENV{RELEASE_TESTING}
+ ? die("Failed to load required release-testing module $MODULE")
+ : plan(skip_all => "$MODULE not available for testing");
+}
+
+meta_yaml_ok();
Added: branches/upstream/libtext-greeking-perl/current/t/98_pod_syntax.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/98_pod_syntax.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/98_pod_syntax.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/98_pod_syntax.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,23 @@
+#!perl
+
+# Test all distribution POD are formatted correctly
+
+use strict;
+use warnings;
+use Test::More;
+
+my $MODULE = 'Test::Pod 1.00';
+
+# Don't run tests for installs
+unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) {
+ plan(skip_all => "Author tests not required for installation");
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ($@) {
+ $ENV{RELEASE_TESTING}
+ ? die("Failed to load required release-testing module $MODULE")
+ : plan(skip_all => "$MODULE not available for testing");
+}
+all_pod_files_ok();
Added: branches/upstream/libtext-greeking-perl/current/t/99_pod_coverage.t
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-greeking-perl/current/t/99_pod_coverage.t?rev=43082&op=file
==============================================================================
--- branches/upstream/libtext-greeking-perl/current/t/99_pod_coverage.t (added)
+++ branches/upstream/libtext-greeking-perl/current/t/99_pod_coverage.t Fri Aug 28 01:33:34 2009
@@ -1,0 +1,23 @@
+#!perl
+
+use strict;
+use warnings;
+use Test::More;
+
+my $MODULE = 'Test::Pod::Coverage 1.00';
+
+# Don't run tests for installs
+unless ($ENV{AUTOMATED_TESTING} or $ENV{RELEASE_TESTING}) {
+ plan(skip_all => "Author tests not required for installation");
+}
+
+# Load the testing module
+eval "use $MODULE";
+if ($@) {
+ $ENV{RELEASE_TESTING}
+ ? die("Failed to load required release-testing module $MODULE")
+ : plan(skip_all => "$MODULE not available for testing");
+}
+
+my $trustparents = {coverage_class => 'Pod::Coverage::CountParents'};
+all_pod_coverage_ok($trustparents);
More information about the Pkg-perl-cvs-commits
mailing list