[Bioperl-guts-l] bioperl-live/Bio/Tools/Run WrapperBase.pm, 1.36, 1.37

Senduran Balasubramaniam sendu at dev.open-bio.org
Tue Jul 3 08:14:02 EDT 2007


Update of /home/repository/bioperl/bioperl-live/Bio/Tools/Run
In directory dev.open-bio.org:/tmp/cvs-serv21340/Bio/Tools/Run

Modified Files:
	WrapperBase.pm 
Log Message:
added -mixed_dash option to _setparams()

Index: WrapperBase.pm
===================================================================
RCS file: /home/repository/bioperl/bioperl-live/Bio/Tools/Run/WrapperBase.pm,v
retrieving revision 1.36
retrieving revision 1.37
diff -C2 -d -r1.36 -r1.37
*** WrapperBase.pm	14 Jun 2007 14:16:18 -0000	1.36
--- WrapperBase.pm	3 Jul 2007 12:14:00 -0000	1.37
***************
*** 425,428 ****
--- 425,431 ----
             -dash => boolean     # prefix all method names with a single dash
             -double_dash => bool # prefix all method names with a double dash
+            -mixed_dash => bool  # prefix single-character method names with a
+                                 # single dash, and multi-character method names
+                                 # with a double-dash
             -underscore_to_dash => boolean # convert all underscores in method
                                              names to dashes
***************
*** 433,437 ****
      my ($self, @args) = @_;
      
!     my ($params, $switches, $join, $lc, $d, $dd, $utd) =
          $self->_rearrange([qw(PARAMS
                                SWITCHES
--- 436,440 ----
      my ($self, @args) = @_;
      
!     my ($params, $switches, $join, $lc, $d, $dd, $md, $utd) =
          $self->_rearrange([qw(PARAMS
                                SWITCHES
***************
*** 440,446 ****
                                DASH
                                DOUBLE_DASH
                                UNDERSCORE_TO_DASH)], @args);
      $self->throw('at least one of -params or -switches is required') unless ($params || $switches);
!     $self->throw("-dash and -double_dash are mutually exclusive") if ($d && $dd);
      $join ||= ' ';
      
--- 443,450 ----
                                DASH
                                DOUBLE_DASH
+                               MIXED_DASH
                                UNDERSCORE_TO_DASH)], @args);
      $self->throw('at least one of -params or -switches is required') unless ($params || $switches);
!     $self->throw("-dash, -double_dash and -mixed_dash are mutually exclusive") if (defined($d) + defined($dd) + defined($md) > 1);
      $join ||= ' ';
      
***************
*** 456,461 ****
              
              $method_out = lc($method_out) if $lc;
!             $method_out = '-'.$method_out if $d;
!             $method_out = '--'.$method_out if $dd;
              $method_out =~ s/_/-/g if $utd;
              
--- 460,466 ----
              
              $method_out = lc($method_out) if $lc;
!             my $method_length = length($method_out) if $md;
!             $method_out = '-'.$method_out if ($d || ($md && ($method_length == 1)));
!             $method_out = '--'.$method_out if ($dd || ($md && ($method_length > 1)));
              $method_out =~ s/_/-/g if $utd;
              



More information about the Bioperl-guts-l mailing list