Author: twists
Date: Sat Jun 6 21:43:26 2009
New Revision: 754
Modified:
trunk/bin/nytprofcg
trunk/bin/nytprofcsv
trunk/bin/nytprofhtml
Log:
Invalid parameters to bin/nytprof* also prints usage
Modified: trunk/bin/nytprofcg
==============================================================================
--- trunk/bin/nytprofcg (original)
+++ trunk/bin/nytprofcg Sat Jun 6 21:43:26 2009
@@ -95,7 +95,10 @@
sub process_cli {
GetOptions( \%opt, qw/file|f=s out|o=s help|h/ )
- or exit 1;
+ or do {
+ usage();
+ exit 1;
+ };
if ( defined( $opt{help} ) ) {
usage();
Modified: trunk/bin/nytprofcsv
==============================================================================
--- trunk/bin/nytprofcsv (original)
+++ trunk/bin/nytprofcsv Sat Jun 6 21:43:26 2009
@@ -32,7 +32,11 @@
out => 'nytprof',
delim => 'comma',
);
-GetOptions(\%opt, qw/file|f=s delete|d out|o=s help|h delim=s annotated|
a/) or exit 1;
+GetOptions(\%opt, qw/file|f=s delete|d out|o=s help|h delim=s annotated|a/)
+ or do {
+ usage();
+ exit 1;
+ };
if (defined($opt{help})) {
usage();
Modified: trunk/bin/nytprofhtml
==============================================================================
--- trunk/bin/nytprofhtml (original)
+++ trunk/bin/nytprofhtml Sat Jun 6 21:43:26 2009
@@ -46,7 +46,11 @@
file => 'nytprof.out',
out => 'nytprof',
);
-GetOptions(\%opt, qw/file|f=s delete|d out|o=s lib|l=s help|h open/) or
exit 1;
+GetOptions(\%opt, qw/file|f=s delete|d out|o=s lib|l=s help|h open/)
+ or do {
+ usage();
+ exit 1;
+ };
if (defined($opt{help})) {
usage();
--~--~---------~--~----~------------~-------~--~----~
You've received this message because you are subscribed to
the Devel::NYTProf Development User group.
Group hosted at: http://groups.google.com/group/develnytprof-dev
Project hosted at: http://perl-devel-nytprof.googlecode.com
CPAN distribution: http://search.cpan.org/dist/Devel-NYTProf
To post, email: [email protected]
To unsubscribe, email: [email protected]
-~----------~----~----~----~------~----~------~--~---