r21994 - in /trunk/libtext-reform-perl: Build.PL Changes MANIFEST META.yml Makefile.PL README debian/changelog demo.pl demo/ demo_columns.pl demo_filler.pl demo_table.pl demo_ws.pl lib/Text/Reform.pm t/ test.pl
gregoa at users.alioth.debian.org
gregoa at users.alioth.debian.org
Fri Jun 20 18:43:21 UTC 2008
Author: gregoa
Date: Fri Jun 20 18:43:19 2008
New Revision: 21994
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=21994
Log:
New upstream release.
Added:
trunk/libtext-reform-perl/Build.PL
- copied unchanged from r21993, branches/upstream/libtext-reform-perl/current/Build.PL
trunk/libtext-reform-perl/META.yml
- copied unchanged from r21993, branches/upstream/libtext-reform-perl/current/META.yml
trunk/libtext-reform-perl/demo/
- copied from r21993, branches/upstream/libtext-reform-perl/current/demo/
trunk/libtext-reform-perl/t/
- copied from r21993, branches/upstream/libtext-reform-perl/current/t/
Removed:
trunk/libtext-reform-perl/demo.pl
trunk/libtext-reform-perl/demo_columns.pl
trunk/libtext-reform-perl/demo_filler.pl
trunk/libtext-reform-perl/demo_table.pl
trunk/libtext-reform-perl/demo_ws.pl
trunk/libtext-reform-perl/test.pl
Modified:
trunk/libtext-reform-perl/Changes
trunk/libtext-reform-perl/MANIFEST
trunk/libtext-reform-perl/Makefile.PL
trunk/libtext-reform-perl/README
trunk/libtext-reform-perl/debian/changelog
trunk/libtext-reform-perl/lib/Text/Reform.pm
Modified: trunk/libtext-reform-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/Changes?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/Changes (original)
+++ trunk/libtext-reform-perl/Changes Fri Jun 20 18:43:19 2008
@@ -1,4 +1,4 @@
-Revision history for Perl extension Text::Reform.
+Revision history for Text-Reform
1.06 Mon Apr 16 14:40:12 2001
@@ -74,3 +74,30 @@
- Added new hyphenator: break_at
+
+
+
+1.12.0 Sun Sep 30 04:51:21 2007
+
+ - Added &columns to export list (thanks Bob)
+
+ - Fixed doc buglets (thanks Mike)
+
+ - Removed use of 'our' to preserve 5.005 compatibility
+
+ - Fixed shebang lines in demos
+
+ - Added WINDOWS_PATCH to patch around apparent bug in POSIX::strtod
+ under Windows (thanks Torsten)
+
+ - Added 'except' option to break_at() (thanks Bron)
+
+ - Changed to dual licensing for Fedora compatibility
+
+
+1.12.1 Sun Sep 30 05:08:10 2007
+
+
+
+1.12.2 Sun Sep 30 05:10:18 2007
+
Modified: trunk/libtext-reform-perl/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/MANIFEST?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/MANIFEST (original)
+++ trunk/libtext-reform-perl/MANIFEST Fri Jun 20 18:43:19 2008
@@ -1,10 +1,25 @@
-lib/Text/Reform.pm
+Build.PL
Changes
MANIFEST
+META.yml # Will be created by "make dist"
Makefile.PL
-test.pl
-demo.pl
-demo_filler.pl
-demo_table.pl
-demo_ws.pl
-demo_columns.pl
+README
+lib/Text/Reform.pm
+t/00.load.t
+t/reform.t
+Makefile.PL
+demo/demo.pl
+demo/demo_badheader.pl
+demo/demo_cols.pl
+demo/demo_columns.pl
+demo/demo_filler.pl
+demo/demo_footer.pl
+demo/demo_leader1.pl
+demo/demo_locale.pl
+demo/demo_reentrant.pl
+demo/demo_simple.pl
+demo/demo_single.pl
+demo/demo_table.pl
+demo/demo_warnings.pl
+demo/demo_ws.pl
+t/pod.t
Modified: trunk/libtext-reform-perl/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/Makefile.PL?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/Makefile.PL (original)
+++ trunk/libtext-reform-perl/Makefile.PL Fri Jun 20 18:43:19 2008
@@ -1,7 +1,17 @@
+use strict;
+use warnings;
+use ExtUtils::MakeMaker;
-use ExtUtils::MakeMaker;
WriteMakefile(
- NAME => q[Text::Reform],
- VERSION => q[1.11],
-
- );
+ NAME => 'Text::Reform',
+ AUTHOR => 'Damian Conway <DCONWAY at CPAN.org>',
+ VERSION_FROM => 'lib/Text/Reform.pm',
+ ABSTRACT_FROM => 'lib/Text/Reform.pm',
+ PL_FILES => {},
+ PREREQ_PM => {
+ 'Test::More' => 0,
+ 'version' => 0,
+ },
+ dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
+ clean => { FILES => 'Text-Reform-*' },
+);
Modified: trunk/libtext-reform-perl/README
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/README?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/README (original)
+++ trunk/libtext-reform-perl/README Fri Jun 20 18:43:19 2008
@@ -1,7 +1,4 @@
-==============================================================================
- Release of version 1.11 of Text::Reform
-==============================================================================
-
+Text::Reform version 1.12.2
NAME
Text::Reform - Manual text wrapping and reformating
@@ -10,32 +7,33 @@
The module supplies a re-entrant, highly configurable replacement
for the built-in Perl format() mechanism.
-AUTHOR
- Damian Conway (damian at conway.org)
+INSTALLATION
-COPYRIGHT
- Copyright (c) 1997-2001, Damian Conway. All Rights Reserved.
- This module is free software. It may be used, redistributed
- and/or modified under the terms of the Perl Artistic License
- (see http://www.perl.com/perl/misc/Artistic.html)
+To install this module, run the following commands:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+
+Alternatively, to install with Module::Build, you can use the following commands:
+
+ perl Build.PL
+ ./Build
+ ./Build test
+ ./Build install
-==============================================================================
+DEPENDENCIES
-CHANGES IN VERSION 1.11
+None.
- - Remove NaN tests (too platform dependent)
+COPYRIGHT AND LICENCE
- - Added new hyphenator: break_at
+Copyright (C) 2000-2007, Damian Conway
-
-
-==============================================================================
-
-AVAILABILITY
-
-Text::Reform has been uploaded to the CPAN
-
-==============================================================================
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself.
Modified: trunk/libtext-reform-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/debian/changelog?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/debian/changelog (original)
+++ trunk/libtext-reform-perl/debian/changelog Fri Jun 20 18:43:19 2008
@@ -1,9 +1,11 @@
-libtext-reform-perl (1.11-7) UNRELEASED; urgency=low
+libtext-reform-perl (1.12.2-1) UNRELEASED; urgency=low
* debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
field (source stanza); Homepage field (source stanza). Removed: XS-
Vcs-Svn fields.
* debian/watch: use dist-based URL.
+
+ * New upstream release.
-- gregor herrmann <gregor+debian at comodo.priv.at> Tue, 09 Oct 2007 22:32:38 +0200
Modified: trunk/libtext-reform-perl/lib/Text/Reform.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libtext-reform-perl/lib/Text/Reform.pm?rev=21994&op=diff
==============================================================================
--- trunk/libtext-reform-perl/lib/Text/Reform.pm (original)
+++ trunk/libtext-reform-perl/lib/Text/Reform.pm Fri Jun 20 18:43:19 2008
@@ -2,13 +2,13 @@
use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); use Carp;
use 5.005;
-$VERSION = '1.11';
+use version; $VERSION = qv('1.12.2');
require Exporter;
@ISA = qw(Exporter);
@EXPORT = qw( form );
- at EXPORT_OK = qw( tag break_with break_at break_wrap break_TeX debug );
+ at EXPORT_OK = qw( columns tag break_with break_at break_wrap break_TeX debug );
my @bspecials = qw( [ | ] );
my @lspecials = qw( < ^ > );
@@ -43,7 +43,7 @@
}
sub carpfirst {
- our %carped;
+ use vars '%carped';
my ($msg) = @_;
return if $carped{$msg}++;
carp $msg;
@@ -78,8 +78,9 @@
}
sub break_at {
- my $hyphen = $_[0];
+ my ($hyphen, $opts_ref) = @_;
my $hylen = length($hyphen);
+ my $except = $opts_ref->{except};
my @ret;
sub
{
@@ -87,7 +88,13 @@
if ($max <= 0) {
@ret = (substr($_[0],0,1), substr($_[0],1))
}
- elsif ($_[0] =~ /(.{1,$max}$hyphen)(.*)/s) {
+ elsif (defined $except && $_[0] =~ m/\A (.{1,$max}) ($except .*)/xms) {
+ @ret = ($1,$2);
+ }
+ elsif (defined $except && $_[0] =~ m/\A ($except) (.*)/xms) {
+ @ret = ($1,$2);
+ }
+ elsif ($_[0] =~ /\A (.{1,$max}$hyphen) (.*)/xms) {
@ret = ($1,$2);
}
elsif (length($_[0])>$_[2]) {
@@ -100,7 +107,6 @@
if ($ret[0] =~ /\A\s*\Z/) { return ("",$_[0]); }
else { return @ret; }
}
-
}
sub break_wrap
@@ -116,7 +122,7 @@
{
my $file = $_[0] || "";
- croak "Can't find TeX::Hypen module"
+ croak "Can't find TeX::Hyphen module"
unless require "TeX/Hyphen.pm";
$hyp{$file} = TeX::Hyphen->new($file||undef)
@@ -375,7 +381,7 @@
sub form
{
- our %carped;
+ use vars '%carped';
local %carped;
my $config = {%std_config};
my $startidx = 0;
@@ -769,7 +775,7 @@
Right-justified field indicator.
A series of two or more sequential >'s specify
a right-justified field to be filled by a subsequent value.
-A single < is formatted as the literal character '<'
+A single > is formatted as the literal character '>'
=item <<<>>>
@@ -782,7 +788,7 @@
Centre-justified field indicator.
A series of two or more sequential ^'s specify
a centred field to be filled by a subsequent value.
-A single ^ is formatted as the literal character '<'
+A single ^ is formatted as the literal character '^'
=item >>>.<<<<
@@ -1235,6 +1241,21 @@
Hence C<break_at> is generally a better choice.
+C<break_at> also takes an 'except' option, which tells the resulting
+subroutine not to break in the middle of certain strings. For example:
+
+ form { break => break_at('-', {except=>qr/Newton-Raphson/}) }
+ "[[[[[[[[[[[[[[",
+ "The Newton-Raphson methodology";
+
+ # returns:
+ #
+ # "The
+ # Newton-Raphson
+ # methodology"
+
+This option is particularly useful for preserving URLs.
+
The subroutine C<Text::Reform::break_TeX>
returns a reference to a sub which hyphenates using
Jan Pazdziora's TeX::Hyphen module. For example:
@@ -1851,12 +1872,40 @@
=head1 BUGS
+The module uses C<POSIX::strtod>, which may be broken under certain versions
+of Windows. Applying the WINDOWS_PATCH patch to Reform.pm will replace the
+POSIX function with a copycat subroutine.
+
There are undoubtedly serious bugs lurking somewhere in code this funky :-)
Bug reports and other feedback are most welcome.
-=head1 COPYRIGHT
-
-Copyright (c) 1997-2000, Damian Conway. All Rights Reserved.
-This module is free software. It may be used, redistributed
-and/or modified under the terms of the Perl Artistic License
- (see http://www.perl.com/perl/misc/Artistic.html)
+=head1 LICENCE AND COPYRIGHT
+
+Copyright (c) 1997-2007, Damian Conway C<< <DCONWAY at CPAN.org> >>. All rights reserved.
+
+This module is free software; you can redistribute it and/or
+modify it under the same terms as Perl itself. See L<perlartistic>.
+
+
+=head1 DISCLAIMER OF WARRANTY
+
+BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
+FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
+OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
+PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER
+EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE
+ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH
+YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL
+NECESSARY SERVICING, REPAIR, OR CORRECTION.
+
+IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
+REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE
+LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL,
+OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE
+THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING
+RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A
+FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF
+SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
More information about the Pkg-perl-cvs-commits
mailing list