]> git.donarmstrong.com Git - biopieces.git/commitdiff
fixed print_usage
authormartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 9 Jul 2008 11:02:33 +0000 (11:02 +0000)
committermartinahansen <martinahansen@74ccb610-7750-0410-82ae-013aeee3265d>
Wed, 9 Jul 2008 11:02:33 +0000 (11:02 +0000)
git-svn-id: http://biopieces.googlecode.com/svn/trunk@140 74ccb610-7750-0410-82ae-013aeee3265d

code_perl/Maasha/Biopieces.pm

index a0d480fa37be655a27a99b61e770c7718d89315e..7badb51e2c30278010f3aaaf8cf08a094365dbb1 100644 (file)
@@ -262,7 +262,7 @@ sub get_options
 
     # Gets options from commandline and checks these vigerously.
 
-    my ( $script,   # name of script
+    my ( $script,     # name of script
        ) = @_;
 
     # Returns hash
@@ -893,9 +893,13 @@ sub get_options
         @options,
     );
 
-#    print STDERR Dumper( \%options ) and exit;
+    $options{ "script" } = $script;
 
-    $options{ "script" }    = $script;
+#    print STDERR Dumper( \%options );
+
+    if ( scalar( keys %options ) == 1 or $options{ "help" } ) {
+        return wantarray ? %options : \%options;
+    }
 
     $options{ "cols" }      = [ split ",", $options{ "cols" } ]      if defined $options{ "cols" };
     $options{ "keys" }      = [ split ",", $options{ "keys" } ]      if defined $options{ "keys" };