--- Convert-UUlib/UUlib.pm 2020/02/28 16:57:25 1.47 +++ Convert-UUlib/UUlib.pm 2020/02/28 17:19:02 1.48 @@ -50,13 +50,11 @@ bootstrap Convert::UUlib $VERSION; -Initialize(); - -# not when < 5.005_6x -# END { CleanUp() } +# dummy function for compatiiblity with pre-1.7 versions +sub Initialize { } for (@_consts) { - my $constant = constant($_); + my $constant = constant ($_); no strict 'refs'; *$_ = sub () { $constant }; } @@ -107,6 +105,7 @@ # read all the files named on the commandline and decode them # into the CURRENT directory. See below for a longer example. LoadFile $_ for @ARGV; + for my $uu (GetFileList) { if ($uu->state & FILE_OK) { $uu->decode; @@ -218,14 +217,10 @@ =over -=item Initialize - -Not normally necessary, (re-)initializes the library. - =item CleanUp -Not normally necessary, could be called at the end to release memory -before starting a new decoding round. +Release memory, file items and clean up files. Should be called after a +decoidng run, if you want to start a new one. =back @@ -450,8 +445,24 @@ =head1 LARGE EXAMPLE DECODER -This is the file C from the distribution, put here -instead of more thorough documentation. +The general workflow for decoding is like this: + +=over + +=item 1. Configure options with C or C. + +=item 2. Load all source files with C. + +=item 3. Optionally C. + +=item 4. Iterate over all C items (i.e. result files). + +=item 5. C to delete files and free items. + +=back + +What follows is the file C from the distribution that +illustrates the above worklfow in a non-trivial example. #!/usr/bin/perl