r4661 - in /packages/libtext-shellwords-perl/branches/upstream/current: MANIFEST META.yml README Shellwords.pm test.pl

gwolf at users.alioth.debian.org gwolf at users.alioth.debian.org
Thu Dec 28 22:35:24 CET 2006


Author: gwolf
Date: Thu Dec 28 22:35:23 2006
New Revision: 4661

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4661
Log:
[svn-upgrade] Integrating new upstream version, libtext-shellwords-perl (1.08)

Added:
    packages/libtext-shellwords-perl/branches/upstream/current/META.yml
Modified:
    packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST
    packages/libtext-shellwords-perl/branches/upstream/current/README
    packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm
    packages/libtext-shellwords-perl/branches/upstream/current/test.pl

Modified: packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST?rev=4661&op=diff
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST (original)
+++ packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST Thu Dec 28 22:35:23 2006
@@ -4,3 +4,4 @@
 README
 Shellwords.pm
 test.pl
+META.yml                                 Module meta-data (added by MakeMaker)

Added: packages/libtext-shellwords-perl/branches/upstream/current/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/META.yml?rev=4661&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/META.yml (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/META.yml Thu Dec 28 22:35:23 2006
@@ -1,0 +1,10 @@
+# http://module-build.sourceforge.net/META-spec.html
+#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
+name:         Text-Shellwords
+version:      1.08
+version_from: Shellwords.pm
+installdirs:  site
+requires:
+
+distribution_type: module
+generated_by: ExtUtils::MakeMaker version 6.17

Modified: packages/libtext-shellwords-perl/branches/upstream/current/README
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/README?rev=4661&op=diff
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/README (original)
+++ packages/libtext-shellwords-perl/branches/upstream/current/README Thu Dec 28 22:35:23 2006
@@ -1,4 +1,4 @@
-Text/Shellwords version 1.00
+Text/Shellwords version 1.08
 ============================
 
 This is a thin wrapper around the shellwords.pl package, which comes

Modified: packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm?rev=4661&op=diff
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm (original)
+++ packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm Thu Dec 28 22:35:23 2006
@@ -5,24 +5,27 @@
 use strict;
 require Exporter;
 
+use Text::ParseWords();
+
+
 use vars qw(@ISA @EXPORT $VERSION);
 @ISA = 'Exporter';
-$VERSION = '1.03';
+$VERSION = '1.08';
 
 @EXPORT = qw(shellwords);
 
 sub shellwords {
-  my @args = @_          ? @_
-            : defined $_ ? $_
-	    : ();
+  my @args = @_;
   return unless @args;
-  Text::Shellwords::Raw::shellwords(map {$_||''} @args); # prevent uninit variable warnings from shellwords.pl
+  foreach(@args) {
+    $_ = '' unless defined $_;
+    s/^\s+//;
+    s/\s+$//;
+  }
+  Text::ParseWords::shellwords(@args);
 }
 
 1;
-
-package Text::Shellwords::Raw;
-require 'shellwords.pl';
 
 __END__
 
@@ -35,9 +38,15 @@
   use Text::Shellwords;
   @words = shellwords($line);
   @words = shellwords(@lines);
-  @words = shellwords();
 
 =head1 DESCRIPTION
+
+This used to be a wrapper around shellwords.pl, but has now been
+superseded by Text::ParseWords.  Use that module insteade.  If you
+use this module, it will simply report the shellwords() function from
+Text::ParseWords.
+
+The old description follows:
 
 This is a thin wrapper around the shellwords.pl package, which comes
 preinstalled with Perl.  This module imports a single subroutine,
@@ -48,9 +57,10 @@
 respects backslash escapes.
 
 If called with one or more arguments, shellwords() will treat each
-argument as a line of text, parse it, and return the tokens.  If
-called without any arguments, shellwords() will parse B<$_> and
-clobber it.
+argument as a line of text, parse it, and return the tokens.
+
+Note that the old behavior of parsing $_ if no arguments are provided
+is no longer supported. Sorry.
 
 =head1 BUGS
 

Modified: packages/libtext-shellwords-perl/branches/upstream/current/test.pl
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/test.pl?rev=4661&op=diff
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/test.pl (original)
+++ packages/libtext-shellwords-perl/branches/upstream/current/test.pl Thu Dec 28 22:35:23 2006
@@ -6,7 +6,7 @@
 # change 'tests => 1' to 'tests => last_test_to_print';
 
 use Test;
-BEGIN { plan tests => 7 };
+BEGIN { plan tests => 6 };
 use Text::Shellwords;
 ok(1); # If we made it this far, we're ok.
 
@@ -19,6 +19,4 @@
 ok(join(',',shellwords('one\ two three')),'one two,three');
 ok(join(',',shellwords('"one two" three')),'one two,three');
 ok(join(',',shellwords(qq(one two\tthree))),'one,two,three');
-$_ = 'one two three';
-ok(join(',',shellwords),'one,two,three');
 ok(join(',',shellwords('one two three',' four five six')),'one,two,three,four,five,six');




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