[Bio] / FigKernelPackages / Tracer.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/Tracer.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.14, Tue Jul 26 20:12:33 2005 UTC revision 1.15, Mon Aug 8 20:06:25 2005 UTC
# Line 2  Line 2 
2    
3      require Exporter;      require Exporter;
4      @ISA = ('Exporter');      @ISA = ('Exporter');
5      @EXPORT = qw(Trace T TSetup QTrace Confess Cluck Min Max Assert Open OpenDir);      @EXPORT = qw(Trace T TSetup QTrace Confess Cluck Min Max Assert Open OpenDir TICK);
6      @EXPORT_OK = qw(GetFile GetOptions Merge MergeOptions ParseCommand ParseRecord UnEscape Escape);      @EXPORT_OK = qw(GetFile GetOptions Merge MergeOptions ParseCommand ParseRecord UnEscape Escape);
7      use strict;      use strict;
8      use Carp qw(longmess croak);      use Carp qw(longmess croak);
# Line 1426  Line 1426 
1426      return $retVal;      return $retVal;
1427  }  }
1428    
1429    =head3 TICK
1430    
1431    C<< my @results = TICK($commandString); >>
1432    
1433    Perform a back-tick operation on a command. If this is a Windows environment, any leading
1434    dot-slash (C<./> will be removed. So, for example, if you were doing
1435    
1436        `./protein.cgi`
1437    
1438    from inside a CGI script, it would work fine in Unix, but would issue an error message
1439    in Windows complaining that C<'.'> is not a valid command. If instead you code
1440    
1441        TICK("./protein.cgi")
1442    
1443    it will work correctly in both environments.
1444    
1445    =over 4
1446    
1447    =item commandString
1448    
1449    The command string to pass to the system.
1450    
1451    =item RETURN
1452    
1453    Returns the standard output from the specified command, as a list.
1454    
1455    =back
1456    
1457    =cut
1458    #: Return Type @;
1459    sub TICK {
1460        # Get the parameters.
1461        my ($commandString) = @_;
1462        # Chop off the dot-slash if this is Windows.
1463        if ($FIG_Config::win_mode) {
1464            $commandString =~ s!^\./!!;
1465        }
1466        # Activate the command and return the result.
1467        return `$commandString`;
1468    }
1469    
1470  1;  1;

Legend:
Removed from v.1.14  
changed lines
  Added in v.1.15

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3