[svn:parrot] r37825 - trunk/tools/dev

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Tue Mar 31 02:51:28 UTC 2009


Author: jkeenan
Date: Tue Mar 31 02:51:28 2009
New Revision: 37825
URL: https://trac.parrot.org/parrot/changeset/37825

Log:
Applying patch submitted by fperrad in https://trac.parrot.org/parrot/ticket/520:  use pod2usage() where possible.

Modified:
   trunk/tools/dev/nopaste.pl

Modified: trunk/tools/dev/nopaste.pl
==============================================================================
--- trunk/tools/dev/nopaste.pl	Tue Mar 31 01:24:46 2009	(r37824)
+++ trunk/tools/dev/nopaste.pl	Tue Mar 31 02:51:28 2009	(r37825)
@@ -9,6 +9,7 @@
 
 use WWW::Mechanize;
 use Getopt::Std;
+use Pod::Usage;
 
 
 my $server  = 'nopaste.snit.ch';
@@ -21,7 +22,7 @@
 
 getopt( 'c:n:t:', $opt );
 
-usage()
+pod2usage(2)
     unless defined $opt->{t};
 
 
@@ -51,22 +52,6 @@
 print "Your paste can be found at ", $link[0]->url, "\n";
 
 
-sub usage {
-    print <<USAGE;
-nopaste.pl - paste the contents of a file via $server
-
-  nopaste.pl -t "TITLE" [ -c CHANNEL ] [ -n NAME ] [ FILENAME ]
-
-    TITLE     the title of the paste
-    CHANNEL   the irc channel (defaults to #parrot)
-    NAME      the username (defaults to username or 'someone')
-    FILENAME  the name of the file to paste (defaults to STDIN)
-USAGE
-    exit 0;
-}
-
-########## DOCUMENTATION ##########
-
 =head1 NAME
 
 tools/dev/nopaste.pl - paste the contents of a file via a pastebot server


More information about the parrot-commits mailing list