r71675 - in /branches/upstream/libtext-format-perl/current: Build.PL Changes MANIFEST META.yml Makefile.PL README inc/ inc/Test/ inc/Test/Run/ inc/Test/Run/Builder.pm lib/Text/Format.pm
jawnsy-guest at users.alioth.debian.org
jawnsy-guest at users.alioth.debian.org
Sat Mar 19 02:04:02 UTC 2011
Author: jawnsy-guest
Date: Sat Mar 19 02:02:24 2011
New Revision: 71675
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=71675
Log:
[svn-upgrade] new version libtext-format-perl (0.53)
Added:
branches/upstream/libtext-format-perl/current/Build.PL
branches/upstream/libtext-format-perl/current/META.yml
branches/upstream/libtext-format-perl/current/inc/
branches/upstream/libtext-format-perl/current/inc/Test/
branches/upstream/libtext-format-perl/current/inc/Test/Run/
branches/upstream/libtext-format-perl/current/inc/Test/Run/Builder.pm
Removed:
branches/upstream/libtext-format-perl/current/README
Modified:
branches/upstream/libtext-format-perl/current/Changes
branches/upstream/libtext-format-perl/current/MANIFEST
branches/upstream/libtext-format-perl/current/Makefile.PL
branches/upstream/libtext-format-perl/current/lib/Text/Format.pm
Added: branches/upstream/libtext-format-perl/current/Build.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/Build.PL?rev=71675&op=file
==============================================================================
--- branches/upstream/libtext-format-perl/current/Build.PL (added)
+++ branches/upstream/libtext-format-perl/current/Build.PL Sat Mar 19 02:02:24 2011
@@ -1,0 +1,51 @@
+use strict;
+use warnings;
+
+use lib "./inc";
+
+use Test::Run::Builder;
+
+my $builder = Test::Run::Builder->new(
+ module_name => 'Text::Format',
+ license => 'perl',
+ dist_author => q{Shlomi Fish <shlomif at cpan.org>},
+ dist_version_from => 'lib/Text/Format.pm',
+ requires =>
+ {
+ 'Carp' => 0,
+ 'vars' => 0,
+ 'strict' => 0,
+ 'warnings' => 0,
+ },
+ build_requires =>
+ {
+ 'Test::More' => 0,
+ 'vars' => 0,
+ },
+ configure_requires =>
+ {
+ 'Module::Build' => 0,
+ },
+ add_to_cleanup => [ 'Module-Format-*' ],
+ create_makefile_pl => 'traditional',
+ meta_merge =>
+ {
+ resources =>
+ {
+ repository => "http://bitbucket.org/shlomif/web-cpan",
+ homepage => "http://www.shlomifish.org/open-source/projects/Text-Format/",
+ },
+ keywords =>
+ [
+ 'format',
+ 'formatting',
+ 'margin',
+ 'margins',
+ 'string',
+ 'text',
+ 'width',
+ ],
+ },
+);
+
+$builder->create_build_script();
Modified: branches/upstream/libtext-format-perl/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/Changes?rev=71675&op=diff
==============================================================================
--- branches/upstream/libtext-format-perl/current/Changes (original)
+++ branches/upstream/libtext-format-perl/current/Changes Sat Mar 19 02:02:24 2011
@@ -1,4 +1,11 @@
Revision history for Perl extension Text::Format.
+
+0.53 Fri Jan 28 13:02:01 IST 2011
+ - Adopted by Shlomi Fish (while disclaiming all rights).
+ - Convert the build system to Module-Build, while adding keywords
+ and resources.
+ - The archive name is now the more standard Text-Format-0.53.tar.gz.
+ - Fix some typos in the documentation.
0.52 Sun Mar 29 11:32:50 1998
- fixed some warnings that appeared when using hanging indents
Modified: branches/upstream/libtext-format-perl/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/MANIFEST?rev=71675&op=diff
==============================================================================
--- branches/upstream/libtext-format-perl/current/MANIFEST (original)
+++ branches/upstream/libtext-format-perl/current/MANIFEST Sat Mar 19 02:02:24 2011
@@ -1,6 +1,9 @@
+Build.PL
Changes
+inc/Test/Run/Builder.pm
lib/Text/Format.pm
t/format.t
t/justify.t
MANIFEST
Makefile.PL
+META.yml
Added: branches/upstream/libtext-format-perl/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/META.yml?rev=71675&op=file
==============================================================================
--- branches/upstream/libtext-format-perl/current/META.yml (added)
+++ branches/upstream/libtext-format-perl/current/META.yml Sat Mar 19 02:02:24 2011
@@ -1,0 +1,37 @@
+---
+abstract: 'Various subroutines to format text.'
+author:
+ - 'Shlomi Fish <shlomif at cpan.org>'
+build_requires:
+ Test::More: 0
+ vars: 0
+configure_requires:
+ Module::Build: 0
+generated_by: 'Module::Build version 0.3617'
+keywords:
+ - format
+ - formatting
+ - margin
+ - margins
+ - string
+ - text
+ - width
+license: perl
+meta-spec:
+ url: http://module-build.sourceforge.net/META-spec-v1.4.html
+ version: 1.4
+name: Text-Format
+provides:
+ Text::Format:
+ file: lib/Text/Format.pm
+ version: 0.53
+requires:
+ Carp: 0
+ strict: 0
+ vars: 0
+ warnings: 0
+resources:
+ homepage: http://www.shlomifish.org/open-source/projects/Text-Format/
+ license: http://dev.perl.org/licenses/
+ repository: http://bitbucket.org/shlomif/web-cpan
+version: 0.53
Modified: branches/upstream/libtext-format-perl/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/Makefile.PL?rev=71675&op=diff
==============================================================================
--- branches/upstream/libtext-format-perl/current/Makefile.PL (original)
+++ branches/upstream/libtext-format-perl/current/Makefile.PL Sat Mar 19 02:02:24 2011
@@ -1,7 +1,18 @@
+# Note: this file was auto-generated by Module::Build::Compat version 0.36_17
use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
- 'NAME' => 'Text::Format',
- 'VERSION_FROM' => './lib/Text/Format.pm',
-);
+WriteMakefile
+(
+ 'NAME' => 'Text::Format',
+ 'VERSION_FROM' => 'lib/Text/Format.pm',
+ 'PREREQ_PM' => {
+ 'Carp' => 0,
+ 'Test::More' => 0,
+ 'strict' => 0,
+ 'vars' => 0,
+ 'warnings' => 0
+ },
+ 'INSTALLDIRS' => 'site',
+ 'EXE_FILES' => [],
+ 'PL_FILES' => {}
+ )
+;
Added: branches/upstream/libtext-format-perl/current/inc/Test/Run/Builder.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/inc/Test/Run/Builder.pm?rev=71675&op=file
==============================================================================
--- branches/upstream/libtext-format-perl/current/inc/Test/Run/Builder.pm (added)
+++ branches/upstream/libtext-format-perl/current/inc/Test/Run/Builder.pm Sat Mar 19 02:02:24 2011
@@ -1,0 +1,76 @@
+package Test::Run::Builder;
+
+use strict;
+use warnings;
+
+use Module::Build;
+
+use vars qw(@ISA);
+
+ at ISA = (qw(Module::Build));
+
+sub ACTION_runtest
+{
+ my ($self) = @_;
+ my $p = $self->{properties};
+
+ $self->depends_on('code');
+
+ local @INC = @INC;
+
+ # Make sure we test the module in blib/
+ unshift @INC, (File::Spec->catdir($p->{base_dir}, $self->blib, 'lib'),
+ File::Spec->catdir($p->{base_dir}, $self->blib, 'arch'));
+
+ $self->do_test_run_tests;
+}
+
+sub ACTION_distruntest {
+ my ($self) = @_;
+
+ $self->depends_on('distdir');
+
+ my $start_dir = $self->cwd;
+ my $dist_dir = $self->dist_dir;
+ chdir $dist_dir or die "Cannot chdir to $dist_dir: $!";
+ # XXX could be different names for scripts
+
+ $self->run_perl_script('Build.PL') # XXX Should this be run w/ --nouse-rcfile
+ or die "Error executing 'Build.PL' in dist directory: $!";
+ $self->run_perl_script('Build')
+ or die "Error executing 'Build' in dist directory: $!";
+ $self->run_perl_script('Build', [], ['runtest'])
+ or die "Error executing 'Build test' in dist directory";
+ chdir $start_dir;
+}
+
+sub do_test_run_tests
+{
+ my $self = shift;
+
+ require Test::Run::CmdLine::Iface;
+
+ my $test_run =
+ Test::Run::CmdLine::Iface->new(
+ {
+ 'test_files' => [glob("t/*.t")],
+ }
+ # 'backend_params' => $self->_get_backend_params(),
+ );
+
+ return $test_run->run();
+}
+
+sub ACTION_tags
+{
+ return
+ system(qw(
+ ctags -f tags --recurse --totals
+ --exclude=blib/** --exclude=t/lib/**
+ --exclude=.svn --exclude='*~'
+ --languages=Perl --langmap=Perl:+.t
+ ));
+}
+
+1;
+
Modified: branches/upstream/libtext-format-perl/current/lib/Text/Format.pm
URL: http://svn.debian.org/wsvn/pkg-perl/branches/upstream/libtext-format-perl/current/lib/Text/Format.pm?rev=71675&op=diff
==============================================================================
--- branches/upstream/libtext-format-perl/current/lib/Text/Format.pm (original)
+++ branches/upstream/libtext-format-perl/current/lib/Text/Format.pm Sat Mar 19 02:02:24 2011
@@ -9,7 +9,7 @@
use Text::Format;
- $text = Text::Format->new (
+ my $text = Text::Format->new (
{
text => [], # all
columns => 72, # format, paragraphs, center
@@ -30,7 +30,7 @@
}
); # these are the default values
- %abbr = (foo => 1, bar => 1);
+ my %abbr = (foo => 1, bar => 1);
$text->abbrevs(\%abbr);
$text->abbrevs();
$text->abbrevs({foo => 1,bar => 1});
@@ -57,7 +57,8 @@
aligned. There is a chance for croaking if you try to subvert the
module. If you don't pass in text then the internal text is worked on,
though not modfied.
-I<Text::Format> is meant for more powerful text formatting than
+
+I<Text::Format> is meant for more powerful text formatting than what
I<Text::Wrap> allows. I also have a module called I<Text::NWrap> that
is meant as a direct replacement for I<Text::Wrap>. I<Text::NWrap>
requires I<Text::Format> since it uses I<Text::Format-E<gt>format> to do the
@@ -121,7 +122,7 @@
=item B<new> \%HASH || NOTHING
Instantiates the object. If you pass a reference to a hash, or an
-anonymous hash then it's used in setting attributes.
+anonymous hash then it is used in setting attributes.
=item B<config> \%HASH
@@ -205,7 +206,7 @@
=item B<noBreakRegex> \%HASH || NOTHING
Pass in a reference to your hash that would hold the regexes on which not
-to break. Returns the hash.
+to break. Without any arguments, it returns the hash.
eg.
{'^Mrs?\.$' => '^\S+$','^\S+$' => '^(?:S|J)r\.$'}
@@ -240,19 +241,23 @@
use Text::Format;
- $text = new Text::Format;
+ my $text = Text::Format->new;
+
$text->rightFill(1);
$text->columns(65);
$text->tabstop(4);
+
print $text->format("a line to format to an indented regular
paragraph using 65 character wide display");
print $text->paragraphs("paragraph one","paragraph two");
print $text->center("hello world","nifty line 2");
print $text->expand("\t\thello world\n","hmm,\twell\n");
print $text->unexpand(" hello world\n"," hmm");
+
$text->config({columns => 132, tabstop => 4});
$text = Text::Format->new();
+
print $text->format(@text);
print $text->paragraphs(@text);
print $text->center(@text);
@@ -264,6 +269,7 @@
$text = Text::Format->new
({tabstop => 4,bodyIndent => 4,text => \@text});
+
print $text->format();
print $text->paragraphs();
print $text->center();
@@ -274,10 +280,10 @@
=head1 BUGS
-Line length can exceed columns specified if columns is set to a small
-number and long words plus leading whitespace exceed column length
-specified. Actually I see this as a feature since it can be used to
-make up a nice word list.
+Line length can exceed the number of specified columns
+if columns is set to a small number and long words plus leading whitespace
+exceed the specified column length. Actually I see this as a feature since it
+can be used to make up a nice word list.
=head1 AUTHOR
@@ -287,23 +293,31 @@
reversed. This program is free software; you can redistribute and/or
modify it under the same terms as Perl itself.
+Adopted and modified by Shlomi Fish, L<http://www.shlomifish.org/> - all
+rights disclaimed.
+
=head1 ACKNOWLEDGMENTS
B<Tom Phoenix>
-found bug with code for two spaces at end of sentence and provided code
-fragment for a better solution, some preliminary suggestions on design
+
+Found a bug with code for two spaces at the end of the sentence and provided
+a code fragment for a better solution. Also some preliminary suggestions on
+the design.
B<Brad Appleton>
-suggesting and explanation of hanging indents, suggestion for
+
+Suggestion and explanation of hanging indents, suggestion for
non-breaking whitespace, general suggestions with regard to interface
-design
+design.
B<Byron Brummer>
-suggestion for better interface design and object design, code for
-better implementation of getting abbreviations
+
+Suggestion for better interface design and object design, code for
+better implementation of getting abbreviations.
B<H. Merijn Brand>
-suggestion for justify feature and original code for doing the
+
+Suggestion for a justify feature and original code for doing the
justification. I changed the code to take into account the extra space
at end of sentence feature.
@@ -315,7 +329,7 @@
use strict;
use vars qw($VERSION);
-$VERSION = '0.52';
+$VERSION = '0.53';
# local abbreviations, you can add your own with abbrevs()
my %abbrev = (
More information about the Pkg-perl-cvs-commits
mailing list