]> git.donarmstrong.com Git - perltidy.git/blobdiff - lib/Perl/Tidy.pod
New upstream version 20210717
[perltidy.git] / lib / Perl / Tidy.pod
index 23c8b02bd102590096795812211ed8bb13e23f5b..138b336e7fea92195d6af2f45c055ca30e125060 100644 (file)
@@ -14,6 +14,8 @@ Perl::Tidy - Parses and beautifies perl source
         perltidyrc        => $perltidyrc,
         logfile           => $logfile,
         errorfile         => $errorfile,
+        teefile           => $teefile,
+        debugfile         => $debugfile,
         formatter         => $formatter,           # callback object (see below)
         dump_options      => $dump_options,
         dump_options_type => $dump_options_type,
@@ -116,6 +118,18 @@ This stream is only created if requested with a B<-g> parameter.  It contains
 detailed diagnostic information about a script which may be useful for
 debugging.
 
+=item teefile
+
+The B<teefile> parameter allows the calling program to capture the tee stream.
+This stream is only created if requested with one of the 'tee' parameters,
+a B<--tee-pod> , B<--tee-block-comments>, B<--tee-side-commnts>, or B<--tee-all-comments>.
+
+=item debugfile
+
+The B<debugfile> parameter allows the calling program to capture the stream
+produced by the B<--DEBUG> parameter.  This parameter is mainly used for 
+debugging perltidy itself.
+
 =item argv
 
 If the B<argv> parameter is given, it will be used instead of the
@@ -188,17 +202,21 @@ B<filter_example.pl> in the perltidy distribution.
 
 =head1 ERROR HANDLING
 
-Perltidy will return with an error flag indicating if the process had to be
-terminated early due to errors in the input parameters.  This can happen for
-example if a parameter is misspelled or given an invalid value.  The calling
-program should check this flag because if it is set the destination stream will
-be empty or incomplete and should be ignored.  Error messages in the B<stderr>
-stream will indicate the cause of any problem.  
+An exit value of 0, 1, or 2 is returned by perltidy to indicate the status of the result.
 
-If the error flag is not set then perltidy ran to completion.   However there
-may still be warning messages in the B<stderr> stream related to control
-parameters, and there may be warning messages in the B<errorfile> stream
-relating to possible syntax errors in the source code being tidied.  
+A exit value of 0 indicates that perltidy ran to completion with no error messages.
+
+An exit value of 1 indicates that the process had to be terminated early due to
+errors in the input parameters.  This can happen for example if a parameter is
+misspelled or given an invalid value.  The calling program should check for
+this flag because if it is set the destination stream will be empty or
+incomplete and should be ignored.  Error messages in the B<stderr> stream will
+indicate the cause of any problem.  
+
+An exit value of 2 indicates that perltidy ran to completion but there there
+are warning messages in the B<stderr> stream related to parameter errors or
+conflicts and/or warning messages in the B<errorfile> stream relating to
+possible syntax errors in the source code being tidied. 
 
 In the event of a catastrophic error for which recovery is not possible
 B<perltidy> terminates by making calls to B<croak> or B<confess> to help the
@@ -408,9 +426,13 @@ C<write_debug_entry> in Tidy.pm.
 
   &perltidy
 
+=head1 INSTALLATION
+
+The module 'Perl::Tidy' comes with a binary 'perltidy' which is installed when the module is installed.  The module name is case-sensitive.  For example, the basic command for installing with cpanm is 'cpanm Perl::Tidy'.
+
 =head1 VERSION
 
-This man page documents Perl::Tidy version 20190601
+This man page documents Perl::Tidy version 20210717
 
 =head1 LICENSE