r4656 - in /packages/libtext-shellwords-perl: ./ branches/
branches/upstream/ branches/upstream/current/ tags/
gwolf at users.alioth.debian.org
gwolf at users.alioth.debian.org
Thu Dec 28 22:17:42 CET 2006
Author: gwolf
Date: Thu Dec 28 22:17:40 2006
New Revision: 4656
URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4656
Log:
[svn-inject] Installing original source of libtext-shellwords-perl
Added:
packages/libtext-shellwords-perl/
packages/libtext-shellwords-perl/branches/
packages/libtext-shellwords-perl/branches/upstream/
packages/libtext-shellwords-perl/branches/upstream/current/
packages/libtext-shellwords-perl/branches/upstream/current/Changes
packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST
packages/libtext-shellwords-perl/branches/upstream/current/Makefile.PL
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
packages/libtext-shellwords-perl/tags/
Added: packages/libtext-shellwords-perl/branches/upstream/current/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/Changes?rev=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/Changes (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/Changes Thu Dec 28 22:17:40 2006
@@ -1,0 +1,12 @@
+Revision history for Perl extension Text::Shellwords.
+1.03 Sat Nov 15 13:52:37 EST 2003
+ - workaround for uninit variable warnings eminating from shellwords.pl
+ when called with array containing undef items.
+1.02 Sun Jun 22 00:00:00 EDT 2003
+ - fixed failing test 6
+1.01 Mon Jun 16 15:02:03 EDT 2003
+ - removed uninit variable warnings when shellwords() called without args
+0.01 Fri Dec 14 09:44:35 2001
+ - original version; created by h2xs 1.21 with options
+ -n Text::Shellwords -A
+
Added: 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=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/MANIFEST Thu Dec 28 22:17:40 2006
@@ -1,0 +1,6 @@
+Changes
+Makefile.PL
+MANIFEST
+README
+Shellwords.pm
+test.pl
Added: packages/libtext-shellwords-perl/branches/upstream/current/Makefile.PL
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libtext-shellwords-perl/branches/upstream/current/Makefile.PL?rev=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/Makefile.PL (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/Makefile.PL Thu Dec 28 22:17:40 2006
@@ -1,0 +1,14 @@
+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::Shellwords',
+ 'VERSION_FROM' => 'Shellwords.pm', # finds $VERSION
+ 'PREREQ_PM' => {}, # e.g., Module::Name => 1.1
+ ($] >= 5.005 ? ## Add these new keywords supported since 5.005
+ (ABSTRACT => 'Text::Shellwords - Parse lines into tokens like the shell does',
+ AUTHOR => 'Lincoln Stein <lstein at cshl.org>') : ()),
+ 'LIBS' => [''], # e.g., '-lm'
+ 'DEFINE' => '', # e.g., '-DHAVE_SOMETHING'
+ 'INC' => '', # e.g., '-I/usr/include/other'
+);
Added: 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=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/README (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/README Thu Dec 28 22:17:40 2006
@@ -1,0 +1,35 @@
+Text/Shellwords version 1.00
+============================
+
+This is a thin wrapper around the shellwords.pl package, which comes
+preinstalled with Perl. This module imports a single subroutine,
+shellwords(). The shellwords() routine parses lines of text and
+returns a set of tokens using the same rules that the Unix shell does
+for its command-line arguments. Tokens are separated by whitespace,
+and can be delimited by single or double quotes. The module also
+respects backslash escapes.
+
+INSTALLATION
+
+To install this module type the following:
+
+ perl Makefile.PL
+ make
+ make test
+ make install
+
+DEPENDENCIES
+
+This module requires these other modules and libraries:
+
+ shellwords.pl (standard part of Perl distribution)
+
+COPYRIGHT AND LICENCE
+
+Author: Lincoln Stein <lstein at cshl.org>.
+
+Copyright (c) 2001 Cold Spring Harbor Laboratory
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself. See DISCLAIMER.txt for
+disclaimers of warranty.
Added: 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=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/Shellwords.pm Thu Dec 28 22:17:40 2006
@@ -1,0 +1,73 @@
+package Text::Shellwords;
+
+# simple wrapper around perl4-based shellwords.pl
+
+use strict;
+require Exporter;
+
+use vars qw(@ISA @EXPORT $VERSION);
+ at ISA = 'Exporter';
+$VERSION = '1.03';
+
+ at EXPORT = qw(shellwords);
+
+sub shellwords {
+ my @args = @_ ? @_
+ : defined $_ ? $_
+ : ();
+ return unless @args;
+ Text::Shellwords::Raw::shellwords(map {$_||''} @args); # prevent uninit variable warnings from shellwords.pl
+}
+
+1;
+
+package Text::Shellwords::Raw;
+require 'shellwords.pl';
+
+__END__
+
+=head1 NAME
+
+Text::Shellwords
+
+=head1 SYNOPSIS
+
+ use Text::Shellwords;
+ @words = shellwords($line);
+ @words = shellwords(@lines);
+ @words = shellwords();
+
+=head1 DESCRIPTION
+
+This is a thin wrapper around the shellwords.pl package, which comes
+preinstalled with Perl. This module imports a single subroutine,
+shellwords(). The shellwords() routine parses lines of text and
+returns a set of tokens using the same rules that the Unix shell does
+for its command-line arguments. Tokens are separated by whitespace,
+and can be delimited by single or double quotes. The module also
+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.
+
+=head1 BUGS
+
+Please report them.
+
+=head1 SEE ALSO
+
+L<shellwords.pl>
+
+=head1 AUTHOR
+
+Lincoln Stein <lstein at cshl.org>.
+
+Copyright (c) 2001 Cold Spring Harbor Laboratory
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself. See DISCLAIMER.txt for
+disclaimers of warranty.
+
+=cut
Added: 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=4656&op=file
==============================================================================
--- packages/libtext-shellwords-perl/branches/upstream/current/test.pl (added)
+++ packages/libtext-shellwords-perl/branches/upstream/current/test.pl Thu Dec 28 22:17:40 2006
@@ -1,0 +1,24 @@
+# Before `make install' is performed this script should be runnable with
+# `make test'. After `make install' it should work as `perl test.pl'
+
+#########################
+
+# change 'tests => 1' to 'tests => last_test_to_print';
+
+use Test;
+BEGIN { plan tests => 7 };
+use Text::Shellwords;
+ok(1); # If we made it this far, we're ok.
+
+#########################
+
+# Insert your test code below, the Test module is use()ed here so read
+# its man page ( perldoc Test ) for help writing this test script.
+
+ok(join(',',shellwords('one two three')),'one,two,three');
+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