[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.91, Mon Aug 20 23:07:05 2007 UTC revision 1.92, Thu Dec 6 13:59:04 2007 UTC
# Line 300  Line 300 
300    
301  =head3 TSetup  =head3 TSetup
302    
303  C<< TSetup($categoryList, $target); >>      TSetup($categoryList, $target);
304    
305  This method is used to specify the trace options. The options are stored as package data  This method is used to specify the trace options. The options are stored as package data
306  and interrogated by the L</Trace> and L</T> methods.  and interrogated by the L</Trace> and L</T> methods.
# Line 374  Line 374 
374    
375  =head3 StandardSetup  =head3 StandardSetup
376    
377  C<< my ($options, @parameters) = StandardSetup(\@categories, \%options, $parmHelp, @ARGV); >>      my ($options, @parameters) = StandardSetup(\@categories, \%options, $parmHelp, @ARGV);
378    
379  This method performs standard command-line parsing and tracing setup. The return  This method performs standard command-line parsing and tracing setup. The return
380  values are a hash of the command-line options and a list of the positional  values are a hash of the command-line options and a list of the positional
# Line 607  Line 607 
607          my $errFileName = "$FIG_Config::temp/err$suffix.log";          my $errFileName = "$FIG_Config::temp/err$suffix.log";
608          open STDOUT, ">$outFileName";          open STDOUT, ">$outFileName";
609          open STDERR, ">$errFileName";          open STDERR, ">$errFileName";
610            # Check for phone support. If we have phone support and a phone number,
611            # we want to turn it on.
612            if ($ENV{PHONE} && defined($FIG_Config::phone)) {
613                $retOptions->{phone} = $ENV{PHONE};
614            }
615      }      }
616      # Now we want to set up tracing. First, we need to know if the user      # Now we want to set up tracing. First, we need to know if the user
617      # wants emergency tracing.      # wants emergency tracing.
# Line 655  Line 660 
660          # Now set up the tracing.          # Now set up the tracing.
661          TSetup("$traceLevel $cats", $traceMode);          TSetup("$traceLevel $cats", $traceMode);
662      }      }
663      # Check for the "h" option. If it is specified, dump the command-line      # Check for the "help" option. If it is specified, dump the command-line
664      # options and exit the program.      # options and exit the program.
665      if ($retOptions->{help}) {      if ($retOptions->{help}) {
666          $0 =~ m#[/\\](\w+)(\.pl)?$#i;          $0 =~ m#[/\\](\w+)(\.pl)?$#i;
# Line 681  Line 686 
686    
687  =head3 Setups  =head3 Setups
688    
689  C<< my $count = Tracer::Setups(); >>      my $count = Tracer::Setups();
690    
691  Return the number of times L</TSetup> has been called.  Return the number of times L</TSetup> has been called.
692    
# Line 696  Line 701 
701    
702  =head3 Open  =head3 Open
703    
704  C<< my $handle = Open($fileHandle, $fileSpec, $message); >>      my $handle = Open($fileHandle, $fileSpec, $message);
705    
706  Open a file.  Open a file.
707    
# Line 788  Line 793 
793    
794  =head3 FindNamePart  =head3 FindNamePart
795    
796  C<< my ($fileName, $start, $len) = Tracer::FindNamePart($fileSpec); >>      my ($fileName, $start, $len) = Tracer::FindNamePart($fileSpec);
797    
798  Extract the portion of a file specification that contains the file name.  Extract the portion of a file specification that contains the file name.
799    
# Line 839  Line 844 
844    
845  =head3 OpenDir  =head3 OpenDir
846    
847  C<< my @files = OpenDir($dirName, $filtered, $flag); >>      my @files = OpenDir($dirName, $filtered, $flag);
848    
849  Open a directory and return all the file names. This function essentially performs  Open a directory and return all the file names. This function essentially performs
850  the functions of an C<opendir> and C<readdir>. If the I<$filtered> parameter is  the functions of an C<opendir> and C<readdir>. If the I<$filtered> parameter is
# Line 905  Line 910 
910    
911  =head3 SetLevel  =head3 SetLevel
912    
913  C<< Tracer::SetLevel($newLevel); >>      Tracer::SetLevel($newLevel);
914    
915  Modify the trace level. A higher trace level will cause more messages to appear.  Modify the trace level. A higher trace level will cause more messages to appear.
916    
# Line 925  Line 930 
930    
931  =head3 Now  =head3 Now
932    
933  C<< my $string = Tracer::Now(); >>      my $string = Tracer::Now();
934    
935  Return a displayable time stamp containing the local time.  Return a displayable time stamp containing the local time.
936    
# Line 947  Line 952 
952    
953  =head3 ParseTraceDate  =head3 ParseTraceDate
954    
955  C<< my $time = Tracer::ParseTraceDate($dateString); >>      my $time = Tracer::ParseTraceDate($dateString);
956    
957  Convert a date from the trace file into a PERL timestamp.  Convert a date from the trace file into a PERL timestamp.
958    
# Line 985  Line 990 
990    
991  =head3 LogErrors  =head3 LogErrors
992    
993  C<< Tracer::LogErrors($fileName); >>      Tracer::LogErrors($fileName);
994    
995  Route the standard error output to a log file.  Route the standard error output to a log file.
996    
# Line 1008  Line 1013 
1013    
1014  =head3 ReadOptions  =head3 ReadOptions
1015    
1016  C<< my %options = Tracer::ReadOptions($fileName); >>      my %options = Tracer::ReadOptions($fileName);
1017    
1018  Read a set of options from a file. Each option is encoded in a line of text that has the  Read a set of options from a file. Each option is encoded in a line of text that has the
1019  format  format
# Line 1069  Line 1074 
1074    
1075  =head3 GetOptions  =head3 GetOptions
1076    
1077  C<< Tracer::GetOptions(\%defaults, \%options); >>      Tracer::GetOptions(\%defaults, \%options);
1078    
1079  Merge a specified set of options into a table of defaults. This method takes two hash references  Merge a specified set of options into a table of defaults. This method takes two hash references
1080  as input and uses the data from the second to update the first. If the second does not exist,  as input and uses the data from the second to update the first. If the second does not exist,
# Line 1078  Line 1083 
1083    
1084  Consider the following example.  Consider the following example.
1085    
1086  C<< my $optionTable = GetOptions({ dbType => 'mySQL', trace => 0 }, $options); >>      my $optionTable = GetOptions({ dbType => 'mySQL', trace => 0 }, $options);
1087    
1088  In this example, the variable B<$options> is expected to contain at most two options-- B<dbType> and  In this example, the variable B<$options> is expected to contain at most two options-- B<dbType> and
1089  B<trace>. The default database type is C<mySQL> and the default trace level is C<0>. If the value of  B<trace>. The default database type is C<mySQL> and the default trace level is C<0>. If the value of
# Line 1086  Line 1091 
1091  the trace level will remain at 0. If B<$options> is undefined, then the database type and trace level  the trace level will remain at 0. If B<$options> is undefined, then the database type and trace level
1092  will remain C<mySQL> and C<0>. If, on the other hand, B<$options> is defined as  will remain C<mySQL> and C<0>. If, on the other hand, B<$options> is defined as
1093    
1094  C<< {databaseType => 'Oracle'} >>      {databaseType => 'Oracle'}
1095    
1096  an error will occur because the B<databaseType> option does not exist.  an error will occur because the B<databaseType> option does not exist.
1097    
# Line 1130  Line 1135 
1135    
1136  =head3 MergeOptions  =head3 MergeOptions
1137    
1138  C<< Tracer::MergeOptions(\%table, \%defaults); >>      Tracer::MergeOptions(\%table, \%defaults);
1139    
1140  Merge default values into a hash table. This method looks at the key-value pairs in the  Merge default values into a hash table. This method looks at the key-value pairs in the
1141  second (default) hash, and if a matching key is not found in the first hash, the default  second (default) hash, and if a matching key is not found in the first hash, the default
# Line 1164  Line 1169 
1169    
1170  =head3 Trace  =head3 Trace
1171    
1172  C<< Trace($message); >>      Trace($message);
1173    
1174  Write a trace message to the target location specified in L</TSetup>. If there has not been  Write a trace message to the target location specified in L</TSetup>. If there has not been
1175  any prior call to B<TSetup>.  any prior call to B<TSetup>.
# Line 1218  Line 1223 
1223    
1224  =head3 T  =head3 T
1225    
1226  C<< my $switch = T($category, $traceLevel); >>      my $switch = T($category, $traceLevel);
1227    
1228      or      or
1229    
1230  C<< my $switch = T($traceLevel); >>      my $switch = T($traceLevel);
1231    
1232  Return TRUE if the trace level is at or above a specified value and the specified category  Return TRUE if the trace level is at or above a specified value and the specified category
1233  is active, else FALSE. If no category is specified, the caller's package name is used.  is active, else FALSE. If no category is specified, the caller's package name is used.
# Line 1287  Line 1292 
1292    
1293  =head3 ParseCommand  =head3 ParseCommand
1294    
1295  C<< my ($options, @arguments) = Tracer::ParseCommand(\%optionTable, @inputList); >>      my ($options, @arguments) = Tracer::ParseCommand(\%optionTable, @inputList);
1296    
1297  Parse a command line consisting of a list of parameters. The initial parameters may be option  Parse a command line consisting of a list of parameters. The initial parameters may be option
1298  specifiers of the form C<->I<option> or C<->I<option>C<=>I<value>. The options are stripped  specifiers of the form C<->I<option> or C<->I<option>C<=>I<value>. The options are stripped
1299  off and merged into a table of default options. The remainder of the command line is  off and merged into a table of default options. The remainder of the command line is
1300  returned as a list of positional arguments. For example, consider the following invocation.  returned as a list of positional arguments. For example, consider the following invocation.
1301    
1302  C<< my ($options, @arguments) = ParseCommand({ errors => 0, logFile => 'trace.log'}, @words); >>      my ($options, @arguments) = ParseCommand({ errors => 0, logFile => 'trace.log'}, @words);
1303    
1304  In this case, the list @words will be treated as a command line and there are two options available,  In this case, the list @words will be treated as a command line and there are two options available,
1305  B<errors> and B<logFile>. If @words has the following format  B<errors> and B<logFile>. If @words has the following format
1306    
1307  C<< -logFile=error.log apple orange rutabaga >>      -logFile=error.log apple orange rutabaga
1308    
1309  then at the end of the invocation, C<$options> will be  then at the end of the invocation, C<$options> will be
1310    
1311  C<< { errors => 0, logFile => 'error.log' } >>      { errors => 0, logFile => 'error.log' }
1312    
1313  and C<@arguments> will contain  and C<@arguments> will contain
1314    
1315  C<< apple orange rutabaga >>      apple orange rutabaga
1316    
1317  The parser allows for some escape sequences. See L</UnEscape> for a description. There is no  The parser allows for some escape sequences. See L</UnEscape> for a description. There is no
1318  support for quote characters. Options can be specified with single or double hyphens.  support for quote characters. Options can be specified with single or double hyphens.
# Line 1363  Line 1368 
1368    
1369  =head3 Escape  =head3 Escape
1370    
1371  C<< my $codedString = Tracer::Escape($realString); >>      my $codedString = Tracer::Escape($realString);
1372    
1373  Escape a string for use in a command length. Tabs will be replaced by C<\t>, new-lines  Escape a string for use in a command length. Tabs will be replaced by C<\t>, new-lines
1374  replaced by C<\n>, carriage returns will be deleted, and backslashes will be doubled. The  replaced by C<\n>, carriage returns will be deleted, and backslashes will be doubled. The
# Line 1418  Line 1423 
1423    
1424  =head3 UnEscape  =head3 UnEscape
1425    
1426  C<< my $realString = Tracer::UnEscape($codedString); >>      my $realString = Tracer::UnEscape($codedString);
1427    
1428  Replace escape sequences with their actual equivalents. C<\t> will be replaced by  Replace escape sequences with their actual equivalents. C<\t> will be replaced by
1429  a tab, C<\n> by a new-line character, and C<\\> by a backslash. C<\r> codes will  a tab, C<\n> by a new-line character, and C<\\> by a backslash. C<\r> codes will
# Line 1478  Line 1483 
1483    
1484  =head3 ParseRecord  =head3 ParseRecord
1485    
1486  C<< my @fields = Tracer::ParseRecord($line); >>      my @fields = Tracer::ParseRecord($line);
1487    
1488  Parse a tab-delimited data line. The data line is split into field values. Embedded tab  Parse a tab-delimited data line. The data line is split into field values. Embedded tab
1489  and new-line characters in the data line must be represented as C<\t> and C<\n>, respectively.  and new-line characters in the data line must be represented as C<\t> and C<\n>, respectively.
# Line 1523  Line 1528 
1528    
1529  =head3 Merge  =head3 Merge
1530    
1531  C<< my @mergedList = Tracer::Merge(@inputList); >>      my @mergedList = Tracer::Merge(@inputList);
1532    
1533  Sort a list of strings and remove duplicates.  Sort a list of strings and remove duplicates.
1534    
# Line 1571  Line 1576 
1576    
1577  =head3 Percent  =head3 Percent
1578    
1579  C<< my $percent = Tracer::Percent($number, $base); >>      my $percent = Tracer::Percent($number, $base);
1580    
1581  Returns the percent of the base represented by the given number. If the base  Returns the percent of the base represented by the given number. If the base
1582  is zero, returns zero.  is zero, returns zero.
# Line 1609  Line 1614 
1614    
1615  =head3 GetFile  =head3 GetFile
1616    
1617  C<< my @fileContents = Tracer::GetFile($fileName); >>      my @fileContents = Tracer::GetFile($fileName);
1618    
1619      or      or
1620    
1621  C<< my $fileContents = Tracer::GetFile($fileName); >>      my $fileContents = Tracer::GetFile($fileName);
1622    
1623  Return the entire contents of a file. In list context, line-ends are removed and  Return the entire contents of a file. In list context, line-ends are removed and
1624  each line is a list element. In scalar context, line-ends are replaced by C<\n>.  each line is a list element. In scalar context, line-ends are replaced by C<\n>.
# Line 1663  Line 1668 
1668    
1669  =head3 PutFile  =head3 PutFile
1670    
1671  C<< Tracer::PutFile($fileName, \@lines); >>      Tracer::PutFile($fileName, \@lines);
1672    
1673  Write out a file from a list of lines of text.  Write out a file from a list of lines of text.
1674    
# Line 1708  Line 1713 
1713    
1714  =head3 QTrace  =head3 QTrace
1715    
1716  C<< my $data = QTrace($format); >>      my $data = QTrace($format);
1717    
1718  Return the queued trace data in the specified format.  Return the queued trace data in the specified format.
1719    
# Line 1751  Line 1756 
1756    
1757  =head3 Confess  =head3 Confess
1758    
1759  C<< Confess($message); >>      Confess($message);
1760    
1761  Trace the call stack and abort the program with the specified message. When used with  Trace the call stack and abort the program with the specified message. When used with
1762  the OR operator and the L</Assert> method, B<Confess> can function as a debugging assert.  the OR operator and the L</Assert> method, B<Confess> can function as a debugging assert.
1763  So, for example  So, for example
1764    
1765  C<< Assert($recNum >= 0) || Confess("Invalid record number $recNum."); >>      Assert($recNum >= 0) || Confess("Invalid record number $recNum.");
1766    
1767  Will abort the program with a stack trace if the value of C<$recNum> is negative.  Will abort the program with a stack trace if the value of C<$recNum> is negative.
1768    
# Line 1791  Line 1796 
1796    
1797  =head3 Assert  =head3 Assert
1798    
1799  C<< Assert($condition1, $condition2, ... $conditionN); >>      Assert($condition1, $condition2, ... $conditionN);
1800    
1801  Return TRUE if all the conditions are true. This method can be used in conjunction with  Return TRUE if all the conditions are true. This method can be used in conjunction with
1802  the OR operator and the L</Confess> method as a debugging assert.  the OR operator and the L</Confess> method as a debugging assert.
1803  So, for example  So, for example
1804    
1805  C<< Assert($recNum >= 0) || Confess("Invalid record number $recNum."); >>      Assert($recNum >= 0) || Confess("Invalid record number $recNum.");
1806    
1807  Will abort the program with a stack trace if the value of C<$recNum> is negative.  Will abort the program with a stack trace if the value of C<$recNum> is negative.
1808    
# Line 1815  Line 1820 
1820    
1821  =head3 Cluck  =head3 Cluck
1822    
1823  C<< Cluck($message); >>      Cluck($message);
1824    
1825  Trace the call stack. Note that for best results, you should qualify the call with a  Trace the call stack. Note that for best results, you should qualify the call with a
1826  trace condition. For example,  trace condition. For example,
1827    
1828  C<< Cluck("Starting record parse.") if T(3); >>      Cluck("Starting record parse.") if T(3);
1829    
1830  will only trace the stack if the trace level for the package is 3 or more.  will only trace the stack if the trace level for the package is 3 or more.
1831    
# Line 1849  Line 1854 
1854    
1855  =head3 Min  =head3 Min
1856    
1857  C<< my $min = Min($value1, $value2, ... $valueN); >>      my $min = Min($value1, $value2, ... $valueN);
1858    
1859  Return the minimum argument. The arguments are treated as numbers.  Return the minimum argument. The arguments are treated as numbers.
1860    
# Line 1882  Line 1887 
1887    
1888  =head3 Max  =head3 Max
1889    
1890  C<< my $max = Max($value1, $value2, ... $valueN); >>      my $max = Max($value1, $value2, ... $valueN);
1891    
1892  Return the maximum argument. The arguments are treated as numbers.  Return the maximum argument. The arguments are treated as numbers.
1893    
# Line 1915  Line 1920 
1920    
1921  =head3 AddToListMap  =head3 AddToListMap
1922    
1923  C<< Tracer::AddToListMap(\%hash, $key, $value1, $value2, ... valueN); >>      Tracer::AddToListMap(\%hash, $key, $value1, $value2, ... valueN);
1924    
1925  Add a key-value pair to a hash of lists. If no value exists for the key, a singleton list  Add a key-value pair to a hash of lists. If no value exists for the key, a singleton list
1926  is created for the key. Otherwise, the new value is pushed onto the list.  is created for the key. Otherwise, the new value is pushed onto the list.
# Line 1951  Line 1956 
1956    
1957  =head3 DebugMode  =head3 DebugMode
1958    
1959  C<< if (Tracer::DebugMode) { ...code... } >>      if (Tracer::DebugMode) { ...code... }
1960    
1961  Return TRUE if debug mode has been turned on, else abort.  Return TRUE if debug mode has been turned on, else abort.
1962    
# Line 1981  Line 1986 
1986    
1987  =head3 Strip  =head3 Strip
1988    
1989  C<< my $string = Tracer::Strip($line); >>      my $string = Tracer::Strip($line);
1990    
1991  Strip all line terminators off a string. This is necessary when dealing with files  Strip all line terminators off a string. This is necessary when dealing with files
1992  that may have been transferred back and forth several times among different  that may have been transferred back and forth several times among different
# Line 2013  Line 2018 
2018    
2019  =head3 Pad  =head3 Pad
2020    
2021  C<< my $paddedString = Tracer::Pad($string, $len, $left, $padChar); >>      my $paddedString = Tracer::Pad($string, $len, $left, $padChar);
2022    
2023  Pad a string to a specified length. The pad character will be a  Pad a string to a specified length. The pad character will be a
2024  space, and the padding will be on the right side unless specified  space, and the padding will be on the right side unless specified
# Line 2084  Line 2089 
2089    
2090  =head3 TICK  =head3 TICK
2091    
2092  C<< my @results = TICK($commandString); >>      my @results = TICK($commandString);
2093    
2094  Perform a back-tick operation on a command. If this is a Windows environment, any leading  Perform a back-tick operation on a command. If this is a Windows environment, any leading
2095  dot-slash (C<./> will be removed. So, for example, if you were doing  dot-slash (C<./> will be removed. So, for example, if you were doing
# Line 2125  Line 2130 
2130    
2131  =head3 ScriptSetup  =head3 ScriptSetup
2132    
2133  C<< my ($cgi, $varHash) = ScriptSetup($noTrace); >>      my ($cgi, $varHash) = ScriptSetup($noTrace);
2134    
2135  Perform standard tracing and debugging setup for scripts. The value returned is  Perform standard tracing and debugging setup for scripts. The value returned is
2136  the CGI object followed by a pre-built variable hash. At the end of the script,  the CGI object followed by a pre-built variable hash. At the end of the script,
# Line 2167  Line 2172 
2172    
2173  =head3 ETracing  =head3 ETracing
2174    
2175  C<< ETracing($parameter); >>      ETracing($parameter);
2176    
2177  Set up emergency tracing. Emergency tracing is tracing that is turned  Set up emergency tracing. Emergency tracing is tracing that is turned
2178  on automatically for any program that calls this method. The emergency  on automatically for any program that calls this method. The emergency
# Line 2248  Line 2253 
2253    
2254  =head3 EmergencyFileName  =head3 EmergencyFileName
2255    
2256  C<< my $fileName = Tracer::EmergencyFileName($tkey); >>      my $fileName = Tracer::EmergencyFileName($tkey);
2257    
2258  Return the emergency tracing file name. This is the file that specifies  Return the emergency tracing file name. This is the file that specifies
2259  the tracing information.  the tracing information.
# Line 2276  Line 2281 
2281    
2282  =head3 EmergencyFileTarget  =head3 EmergencyFileTarget
2283    
2284  C<< my $fileName = Tracer::EmergencyFileTarget($tkey); >>      my $fileName = Tracer::EmergencyFileTarget($tkey);
2285    
2286  Return the emergency tracing target file name. This is the file that receives  Return the emergency tracing target file name. This is the file that receives
2287  the tracing output for file-based tracing.  the tracing output for file-based tracing.
# Line 2304  Line 2309 
2309    
2310  =head3 EmergencyTracingDest  =head3 EmergencyTracingDest
2311    
2312  C<< my $dest = Tracer::EmergencyTracingDest($tkey, $myDest); >>      my $dest = Tracer::EmergencyTracingDest($tkey, $myDest);
2313    
2314  This method converts an emergency tracing destination to a real  This method converts an emergency tracing destination to a real
2315  tracing destination. The main difference is that if the  tracing destination. The main difference is that if the
# Line 2349  Line 2354 
2354    
2355  =head3 Emergency  =head3 Emergency
2356    
2357  C<< Emergency($key, $hours, $dest, $level, @modules); >>      Emergency($key, $hours, $dest, $level, @modules);
2358    
2359  Turn on emergency tracing. This method is normally invoked over the web from  Turn on emergency tracing. This method is normally invoked over the web from
2360  a debugging console, but it can also be called by the C<trace.pl> script.  a debugging console, but it can also be called by the C<trace.pl> script.
# Line 2398  Line 2403 
2403    
2404  =head3 EmergencyKey  =head3 EmergencyKey
2405    
2406  C<< my $tkey = EmergencyKey($parameter); >>      my $tkey = EmergencyKey($parameter);
2407    
2408  Return the Key to be used for emergency tracing. This could be an IP address,  Return the Key to be used for emergency tracing. This could be an IP address,
2409   a session ID, or a user name, depending on the environment.   a session ID, or a user name, depending on the environment.
# Line 2450  Line 2455 
2455    
2456  =head3 TraceParms  =head3 TraceParms
2457    
2458  C<< Tracer::TraceParms($cgi); >>      Tracer::TraceParms($cgi);
2459    
2460  Trace the CGI parameters at trace level CGI => 3 and the environment variables  Trace the CGI parameters at trace level CGI => 3 and the environment variables
2461  at level CGI => 4.  at level CGI => 4.
# Line 2492  Line 2497 
2497    
2498  =head3 ScriptFinish  =head3 ScriptFinish
2499    
2500  C<< ScriptFinish($webData, $varHash); >>      ScriptFinish($webData, $varHash);
2501    
2502  Output a web page at the end of a script. Either the string to be output or the  Output a web page at the end of a script. Either the string to be output or the
2503  name of a template file can be specified. If the second parameter is omitted,  name of a template file can be specified. If the second parameter is omitted,
# Line 2594  Line 2599 
2599    
2600  =head3 Insure  =head3 Insure
2601    
2602  C<< Insure($dirName, $chmod); >>      Insure($dirName, $chmod);
2603    
2604  Insure a directory is present.  Insure a directory is present.
2605    
# Line 2631  Line 2636 
2636    
2637  =head3 ChDir  =head3 ChDir
2638    
2639  C<< ChDir($dirName); >>      ChDir($dirName);
2640    
2641  Change to the specified directory.  Change to the specified directory.
2642    
# Line 2660  Line 2665 
2665    
2666  =head3 SendSMS  =head3 SendSMS
2667    
2668  C<< my $msgID = Tracer::SendSMS($phoneNumber, $msg); >>      my $msgID = Tracer::SendSMS($phoneNumber, $msg);
2669    
2670  Send a text message to a phone number using Clickatell. The FIG_Config file must contain the  Send a text message to a phone number using Clickatell. The FIG_Config file must contain the
2671  user name, password, and API ID for the relevant account in the hash reference variable  user name, password, and API ID for the relevant account in the hash reference variable
# Line 2737  Line 2742 
2742    
2743  =head3 CommaFormat  =head3 CommaFormat
2744    
2745  C<< my $formatted = Tracer::CommaFormat($number); >>      my $formatted = Tracer::CommaFormat($number);
2746    
2747  Insert commas into a number.  Insert commas into a number.
2748    
# Line 2772  Line 2777 
2777  }  }
2778  =head3 SetPermissions  =head3 SetPermissions
2779    
2780  C<< Tracer::SetPermissions($dirName, $group, $mask, %otherMasks); >>      Tracer::SetPermissions($dirName, $group, $mask, %otherMasks);
2781    
2782  Set the permissions for a directory and all the files and folders inside it.  Set the permissions for a directory and all the files and folders inside it.
2783  In addition, the group ownership will be changed to the specified value.  In addition, the group ownership will be changed to the specified value.
# Line 2906  Line 2911 
2911    
2912  =head3 CompareLists  =head3 CompareLists
2913    
2914  C<< my ($inserted, $deleted) = Tracer::CompareLists(\@newList, \@oldList, $keyIndex); >>      my ($inserted, $deleted) = Tracer::CompareLists(\@newList, \@oldList, $keyIndex);
2915    
2916  Compare two lists of tuples, and return a hash analyzing the differences. The lists  Compare two lists of tuples, and return a hash analyzing the differences. The lists
2917  are presumed to be sorted alphabetically by the value in the $keyIndex column.  are presumed to be sorted alphabetically by the value in the $keyIndex column.
# Line 2973  Line 2978 
2978    
2979  =head3 GetLine  =head3 GetLine
2980    
2981  C<< my @data = Tracer::GetLine($handle); >>      my @data = Tracer::GetLine($handle);
2982    
2983  Read a line of data from a tab-delimited file.  Read a line of data from a tab-delimited file.
2984    
# Line 3032  Line 3037 
3037    
3038  =head3 PutLine  =head3 PutLine
3039    
3040  C<< Tracer::PutLine($handle, \@fields, $eol); >>      Tracer::PutLine($handle, \@fields, $eol);
3041    
3042  Write a line of data to a tab-delimited file. The specified field values will be  Write a line of data to a tab-delimited file. The specified field values will be
3043  output in tab-separated form, with a trailing new-line.  output in tab-separated form, with a trailing new-line.
# Line 3064  Line 3069 
3069    
3070  =head3 GenerateURL  =head3 GenerateURL
3071    
3072  C<< my $queryUrl = Tracer::GenerateURL($page, %parameters); >>      my $queryUrl = Tracer::GenerateURL($page, %parameters);
3073    
3074  Generate a GET-style URL for the specified page with the specified parameter  Generate a GET-style URL for the specified page with the specified parameter
3075  names and values. The values will be URL-escaped automatically. So, for  names and values. The values will be URL-escaped automatically. So, for
# Line 3112  Line 3117 
3117    
3118  =head3 ApplyURL  =head3 ApplyURL
3119    
3120  C<< Tracer::ApplyURL($table, $target, $url); >>      Tracer::ApplyURL($table, $target, $url);
3121    
3122  Run through a two-dimensional table (or more accurately, a list of lists), converting the  Run through a two-dimensional table (or more accurately, a list of lists), converting the
3123  I<$target> column to HTML text having a hyperlink to a URL in the I<$url> column. The  I<$target> column to HTML text having a hyperlink to a URL in the I<$url> column. The
# Line 3155  Line 3160 
3160    
3161  =head3 CombineURL  =head3 CombineURL
3162    
3163  C<< my $combinedHtml = Tracer::CombineURL($text, $url); >>      my $combinedHtml = Tracer::CombineURL($text, $url);
3164    
3165  This method will convert the specified text into HTML hyperlinked to the specified  This method will convert the specified text into HTML hyperlinked to the specified
3166  URL. The hyperlinking will only take place if the URL looks legitimate: that is, it  URL. The hyperlinking will only take place if the URL looks legitimate: that is, it

Legend:
Removed from v.1.91  
changed lines
  Added in v.1.92

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3