1 package IO::Uncompress::RawInflate ;
8 use Compress::Raw::Zlib 2.012 ;
9 use IO::Compress::Base::Common 2.012 qw(:Status createSelfTiedObject);
11 use IO::Uncompress::Base 2.012 ;
12 use IO::Uncompress::Adapter::Inflate 2.012 ;
18 our ($VERSION, @ISA, @EXPORT_OK, %EXPORT_TAGS, %DEFLATE_CONSTANTS, $RawInflateError);
21 $RawInflateError = '';
23 @ISA = qw( Exporter IO::Uncompress::Base );
24 @EXPORT_OK = qw( $RawInflateError rawinflate ) ;
25 %DEFLATE_CONSTANTS = ();
26 %EXPORT_TAGS = %IO::Uncompress::Base::EXPORT_TAGS ;
27 push @{ $EXPORT_TAGS{all} }, @EXPORT_OK ;
28 Exporter::export_ok_tags('all');
35 my $obj = createSelfTiedObject($class, \$RawInflateError);
36 $obj->_create(undef, 0, @_);
41 my $obj = createSelfTiedObject(undef, \$RawInflateError);
42 return $obj->_inf(@_);
63 my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject(
65 $got->value('ADLER32'),
69 return $self->saveErrorString(undef, $errstr, $errno)
72 *$self->{Uncomp} = $obj;
74 my $magic = $self->ckMagic()
77 *$self->{Info} = $self->readHeader($magic)
89 return $self->_isRaw() ;
99 'FingerprintLength' => 0,
101 'TrailerLength' => 0,
115 my $got = $self->_isRawx(@_);
118 *$self->{Pending} = *$self->{HeaderPending} ;
121 $self->pushBack(*$self->{HeaderPending});
122 *$self->{Uncomp}->reset();
124 *$self->{HeaderPending} = '';
134 $magic = '' unless defined $magic ;
138 $self->smartRead(\$buffer, *$self->{BlockSize}) >= 0
139 or return $self->saveErrorString(undef, "No data to read");
141 my $temp_buf = $magic . $buffer ;
142 *$self->{HeaderPending} = $temp_buf ;
144 my $status = *$self->{Uncomp}->uncompr(\$temp_buf, \$buffer, $self->smartEof()) ;
145 return $self->saveErrorString(undef, *$self->{Uncomp}{Error}, STATUS_ERROR)
146 if $status == STATUS_ERROR;
148 #my $buf_len = *$self->{Uncomp}->uncompressedBytes();
149 my $buf_len = length $buffer;
151 if ($status == STATUS_ENDSTREAM) {
152 if (*$self->{MultiStream}
153 && (length $temp_buf || ! $self->smartEof())){
154 *$self->{NewStream} = 1 ;
155 *$self->{EndStream} = 0 ;
156 $self->pushBack($temp_buf);
159 *$self->{EndStream} = 1 ;
160 $self->pushBack($temp_buf);
163 *$self->{HeaderPending} = $buffer ;
164 *$self->{InflatedBytesRead} = $buf_len ;
165 *$self->{TotalInflatedBytesRead} += $buf_len ;
166 *$self->{Type} = 'rfc1951';
168 $self->saveStatus(STATUS_OK);
173 'TrailerLength' => 0,
183 # inflateSync is a no-op in Plain mode
187 return 0 if *$self->{Closed} ;
188 #return G_EOF if !length *$self->{Pending} && *$self->{EndStream} ;
189 return 0 if ! length *$self->{Pending} && *$self->{EndStream} ;
192 *$self->{Strict} = 0 ;
199 if (length *$self->{Pending} )
201 $temp_buf = *$self->{Pending} ;
202 *$self->{Pending} = '';
206 $status = $self->smartRead(\$temp_buf, *$self->{BlockSize}) ;
207 return $self->saveErrorString(0, "Error Reading Data")
211 *$self->{EndStream} = 1 ;
212 return $self->saveErrorString(0, "unexpected end of file", STATUS_ERROR);
216 $status = *$self->{Uncomp}->sync($temp_buf) ;
218 if ($status == STATUS_OK)
220 *$self->{Pending} .= $temp_buf ;
224 last unless $status == STATUS_ERROR ;
235 # my $end_offset = 0;
237 # $status = $self->scan()
238 # #or return $self->saveErrorString(undef, "Error Scanning: $$error_ref", $self->errorNo) ;
239 # or return $self->saveErrorString(G_ERR, "Error Scanning: $status")
241 # $status = $self->zap($end_offset)
242 # or return $self->saveErrorString(G_ERR, "Error Zapping: $status");
243 # #or return $self->saveErrorString(undef, "Error Zapping: $$error_ref", $self->errorNo) ;
245 # #(*$obj->{Deflate}, $status) = $inf->createDeflate();
247 ## *$obj->{Header} = *$inf->{Info}{Header};
248 ## *$obj->{UnCompSize_32bit} =
249 ## *$obj->{BytesWritten} = *$inf->{UnCompSize_32bit} ;
250 ## *$obj->{CompSize_32bit} = *$inf->{CompSize_32bit} ;
253 ## if ( $outType eq 'buffer')
254 ## { substr( ${ *$self->{Buffer} }, $end_offset) = '' }
255 ## elsif ($outType eq 'handle' || $outType eq 'filename') {
256 ## *$self->{FH} = *$inf->{FH} ;
257 ## delete *$inf->{FH};
258 ## *$obj->{FH}->flush() ;
259 ## *$obj->{Handle} = 1 if $outType eq 'handle';
261 ## #seek(*$obj->{FH}, $end_offset, SEEK_SET)
262 ## *$obj->{FH}->seek($end_offset, SEEK_SET)
263 ## or return $obj->saveErrorString(undef, $!, $!) ;
272 return 1 if *$self->{Closed} ;
273 return 1 if !length *$self->{Pending} && *$self->{EndStream} ;
278 $len = $self->_raw_read(\$buffer, 1)
279 while ! *$self->{EndStream} && $len >= 0 ;
281 #return $len if $len < 0 ? $len : 0 ;
282 return $len < 0 ? 0 : 1 ;
289 my $headerLength = *$self->{Info}{HeaderLength};
290 my $block_offset = $headerLength + *$self->{Uncomp}->getLastBlockOffset();
291 $_[0] = $headerLength + *$self->{Uncomp}->getEndOffset();
292 #printf "# End $_[0], headerlen $headerLength \n";;
293 #printf "# block_offset $block_offset %x\n", $block_offset;
295 ( $self->smartSeek($block_offset) &&
296 $self->smartRead(\$byte, 1) )
297 or return $self->saveErrorString(0, $!, $!);
299 #printf "#byte is %x\n", unpack('C*',$byte);
300 *$self->{Uncomp}->resetLastBlockByte($byte);
301 #printf "#to byte is %x\n", unpack('C*',$byte);
303 ( $self->smartSeek($block_offset) &&
304 $self->smartWrite($byte) )
305 or return $self->saveErrorString(0, $!, $!);
307 #$self->smartSeek($end_offset, 1);
315 my ($def, $status) = *$self->{Uncomp}->createDeflateStream(
317 -WindowBits => - MAX_WBITS,
318 -CRC32 => *$self->{Params}->value('CRC32'),
319 -ADLER32 => *$self->{Params}->value('ADLER32'),
322 return wantarray ? ($status, $def) : $def ;
333 IO::Uncompress::RawInflate - Read RFC 1951 files/buffers
337 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
339 my $status = rawinflate $input => $output [,OPTS]
340 or die "rawinflate failed: $RawInflateError\n";
342 my $z = new IO::Uncompress::RawInflate $input [OPTS]
343 or die "rawinflate failed: $RawInflateError\n";
345 $status = $z->read($buffer)
346 $status = $z->read($buffer, $length)
347 $status = $z->read($buffer, $length, $offset)
348 $line = $z->getline()
353 $status = $z->inflateSync()
355 $data = $z->trailingData()
356 $status = $z->nextStream()
357 $data = $z->getHeaderInfo()
359 $z->seek($position, $whence)
371 read($z, $buffer, $length);
372 read($z, $buffer, $length, $offset);
374 seek($z, $position, $whence)
382 This module provides a Perl interface that allows the reading of
383 files/buffers that conform to RFC 1951.
385 For writing RFC 1951 files/buffers, see the companion module IO::Compress::RawDeflate.
387 =head1 Functional Interface
389 A top-level function, C<rawinflate>, is provided to carry out
390 "one-shot" uncompression between buffers and/or files. For finer
391 control over the uncompression process, see the L</"OO Interface">
394 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
396 rawinflate $input => $output [,OPTS]
397 or die "rawinflate failed: $RawInflateError\n";
399 The functional interface needs Perl5.005 or better.
401 =head2 rawinflate $input => $output [, OPTS]
403 C<rawinflate> expects at least two parameters, C<$input> and C<$output>.
405 =head3 The C<$input> parameter
407 The parameter, C<$input>, is used to define the source of
410 It can take one of the following forms:
416 If the C<$input> parameter is a simple scalar, it is assumed to be a
417 filename. This file will be opened for reading and the input data
418 will be read from it.
422 If the C<$input> parameter is a filehandle, the input data will be
424 The string '-' can be used as an alias for standard input.
426 =item A scalar reference
428 If C<$input> is a scalar reference, the input data will be read
431 =item An array reference
433 If C<$input> is an array reference, each element in the array must be a
436 The input data will be read from each file in turn.
438 The complete array will be walked to ensure that it only
439 contains valid filenames before any data is uncompressed.
441 =item An Input FileGlob string
443 If C<$input> is a string that is delimited by the characters "<" and ">"
444 C<rawinflate> will assume that it is an I<input fileglob string>. The
445 input is the list of files that match the fileglob.
447 If the fileglob does not match any files ...
449 See L<File::GlobMapper|File::GlobMapper> for more details.
453 If the C<$input> parameter is any other type, C<undef> will be returned.
455 =head3 The C<$output> parameter
457 The parameter C<$output> is used to control the destination of the
458 uncompressed data. This parameter can take one of these forms.
464 If the C<$output> parameter is a simple scalar, it is assumed to be a
465 filename. This file will be opened for writing and the uncompressed
466 data will be written to it.
470 If the C<$output> parameter is a filehandle, the uncompressed data
471 will be written to it.
472 The string '-' can be used as an alias for standard output.
474 =item A scalar reference
476 If C<$output> is a scalar reference, the uncompressed data will be
477 stored in C<$$output>.
479 =item An Array Reference
481 If C<$output> is an array reference, the uncompressed data will be
482 pushed onto the array.
484 =item An Output FileGlob
486 If C<$output> is a string that is delimited by the characters "<" and ">"
487 C<rawinflate> will assume that it is an I<output fileglob string>. The
488 output is the list of files that match the fileglob.
490 When C<$output> is an fileglob string, C<$input> must also be a fileglob
491 string. Anything else is an error.
495 If the C<$output> parameter is any other type, C<undef> will be returned.
499 When C<$input> maps to multiple compressed files/buffers and C<$output> is
500 a single file/buffer, after uncompression C<$output> will contain a
501 concatenation of all the uncompressed data from each of the input
504 =head2 Optional Parameters
506 Unless specified below, the optional parameters for C<rawinflate>,
507 C<OPTS>, are the same as those used with the OO interface defined in the
508 L</"Constructor Options"> section below.
512 =item C<< AutoClose => 0|1 >>
514 This option applies to any input or output data streams to
515 C<rawinflate> that are filehandles.
517 If C<AutoClose> is specified, and the value is true, it will result in all
518 input and/or output filehandles being closed once C<rawinflate> has
521 This parameter defaults to 0.
523 =item C<< BinModeOut => 0|1 >>
525 When writing to a file or filehandle, set C<binmode> before writing to the
530 =item C<< Append => 0|1 >>
534 =item C<< MultiStream => 0|1 >>
536 This option is a no-op.
538 =item C<< TrailingData => $scalar >>
540 Returns the data, if any, that is present immediately after the compressed
541 data stream once uncompression is complete.
543 This option can be used when there is useful information immediately
544 following the compressed data stream, and you don't know the length of the
545 compressed data stream.
547 If the input is a buffer, C<trailingData> will return everything from the
548 end of the compressed data stream to the end of the buffer.
550 If the input is a filehandle, C<trailingData> will return the data that is
551 left in the filehandle input buffer once the end of the compressed data
552 stream has been reached. You can then use the filehandle to read the rest
555 Don't bother using C<trailingData> if the input is a filename.
557 If you know the length of the compressed data stream before you start
558 uncompressing, you can avoid having to use C<trailingData> by setting the
559 C<InputLength> option.
565 To read the contents of the file C<file1.txt.1951> and write the
566 compressed data to the file C<file1.txt>.
570 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
572 my $input = "file1.txt.1951";
573 my $output = "file1.txt";
574 rawinflate $input => $output
575 or die "rawinflate failed: $RawInflateError\n";
577 To read from an existing Perl filehandle, C<$input>, and write the
578 uncompressed data to a buffer, C<$buffer>.
582 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
585 my $input = new IO::File "<file1.txt.1951"
586 or die "Cannot open 'file1.txt.1951': $!\n" ;
588 rawinflate $input => \$buffer
589 or die "rawinflate failed: $RawInflateError\n";
591 To uncompress all files in the directory "/my/home" that match "*.txt.1951" and store the compressed data in the same directory
595 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
597 rawinflate '</my/home/*.txt.1951>' => '</my/home/#1.txt>'
598 or die "rawinflate failed: $RawInflateError\n";
600 and if you want to compress each file one at a time, this will do the trick
604 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
606 for my $input ( glob "/my/home/*.txt.1951" )
609 $output =~ s/.1951// ;
610 rawinflate $input => $output
611 or die "Error compressing '$input': $RawInflateError\n";
618 The format of the constructor for IO::Uncompress::RawInflate is shown below
620 my $z = new IO::Uncompress::RawInflate $input [OPTS]
621 or die "IO::Uncompress::RawInflate failed: $RawInflateError\n";
623 Returns an C<IO::Uncompress::RawInflate> object on success and undef on failure.
624 The variable C<$RawInflateError> will contain an error message on failure.
626 If you are running Perl 5.005 or better the object, C<$z>, returned from
627 IO::Uncompress::RawInflate can be used exactly like an L<IO::File|IO::File> filehandle.
628 This means that all normal input file operations can be carried out with
629 C<$z>. For example, to read a line from a compressed file/buffer you can
630 use either of these forms
632 $line = $z->getline();
635 The mandatory parameter C<$input> is used to determine the source of the
636 compressed data. This parameter can take one of three forms.
642 If the C<$input> parameter is a scalar, it is assumed to be a filename. This
643 file will be opened for reading and the compressed data will be read from it.
647 If the C<$input> parameter is a filehandle, the compressed data will be
649 The string '-' can be used as an alias for standard input.
651 =item A scalar reference
653 If C<$input> is a scalar reference, the compressed data will be read from
658 =head2 Constructor Options
660 The option names defined below are case insensitive and can be optionally
661 prefixed by a '-'. So all of the following are valid
668 OPTS is a combination of the following options:
672 =item C<< AutoClose => 0|1 >>
674 This option is only valid when the C<$input> parameter is a filehandle. If
675 specified, and the value is true, it will result in the file being closed once
676 either the C<close> method is called or the IO::Uncompress::RawInflate object is
679 This parameter defaults to 0.
681 =item C<< MultiStream => 0|1 >>
683 Allows multiple concatenated compressed streams to be treated as a single
684 compressed stream. Decompression will stop once either the end of the
685 file/buffer is reached, an error is encountered (premature eof, corrupt
686 compressed data) or the end of a stream is not immediately followed by the
687 start of another stream.
689 This parameter defaults to 0.
691 =item C<< Prime => $string >>
693 This option will uncompress the contents of C<$string> before processing the
696 This option can be useful when the compressed data is embedded in another
697 file/data structure and it is not possible to work out where the compressed
698 data begins without having to read the first few bytes. If this is the
699 case, the uncompression can be I<primed> with these bytes using this
702 =item C<< Transparent => 0|1 >>
704 If this option is set and the input file/buffer is not compressed data,
705 the module will allow reading of it anyway.
707 In addition, if the input file/buffer does contain compressed data and
708 there is non-compressed data immediately following it, setting this option
709 will make this module treat the whole file/bufffer as a single data stream.
711 This option defaults to 1.
713 =item C<< BlockSize => $num >>
715 When reading the compressed input data, IO::Uncompress::RawInflate will read it in
716 blocks of C<$num> bytes.
718 This option defaults to 4096.
720 =item C<< InputLength => $size >>
722 When present this option will limit the number of compressed bytes read
723 from the input file/buffer to C<$size>. This option can be used in the
724 situation where there is useful data directly after the compressed data
725 stream and you know beforehand the exact length of the compressed data
728 This option is mostly used when reading from a filehandle, in which case
729 the file pointer will be left pointing to the first byte directly after the
730 compressed data stream.
732 This option defaults to off.
734 =item C<< Append => 0|1 >>
736 This option controls what the C<read> method does with uncompressed data.
738 If set to 1, all uncompressed data will be appended to the output parameter
739 of the C<read> method.
741 If set to 0, the contents of the output parameter of the C<read> method
742 will be overwritten by the uncompressed data.
746 =item C<< Strict => 0|1 >>
748 This option is a no-op.
762 $status = $z->read($buffer)
764 Reads a block of compressed data (the size the the compressed block is
765 determined by the C<Buffer> option in the constructor), uncompresses it and
766 writes any uncompressed data into C<$buffer>. If the C<Append> parameter is
767 set in the constructor, the uncompressed data will be appended to the
768 C<$buffer> parameter. Otherwise C<$buffer> will be overwritten.
770 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
771 or a negative number on error.
777 $status = $z->read($buffer, $length)
778 $status = $z->read($buffer, $length, $offset)
780 $status = read($z, $buffer, $length)
781 $status = read($z, $buffer, $length, $offset)
783 Attempt to read C<$length> bytes of uncompressed data into C<$buffer>.
785 The main difference between this form of the C<read> method and the
786 previous one, is that this one will attempt to return I<exactly> C<$length>
787 bytes. The only circumstances that this function will not is if end-of-file
788 or an IO error is encountered.
790 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
791 or a negative number on error.
797 $line = $z->getline()
802 This method fully supports the use of of the variable C<$/> (or
803 C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
804 determine what constitutes an end of line. Paragraph mode, record mode and
805 file slurp mode are all supported.
813 Read a single character.
819 $char = $z->ungetc($string)
825 $status = $z->inflateSync()
833 $hdr = $z->getHeaderInfo();
834 @hdrs = $z->getHeaderInfo();
836 This method returns either a hash reference (in scalar context) or a list
837 or hash references (in array context) that contains information about each
838 of the header fields in the compressed data stream(s).
847 Returns the uncompressed file offset.
856 Returns true if the end of the compressed input stream has been reached.
860 $z->seek($position, $whence);
861 seek($z, $position, $whence);
863 Provides a sub-set of the C<seek> functionality, with the restriction
864 that it is only legal to seek forward in the input file/buffer.
865 It is a fatal error to attempt to seek backward.
867 The C<$whence> parameter takes one the usual values, namely SEEK_SET,
868 SEEK_CUR or SEEK_END.
870 Returns 1 on success, 0 on failure.
879 This is a noop provided for completeness.
885 Returns true if the object currently refers to a opened file/buffer.
889 my $prev = $z->autoflush()
890 my $prev = $z->autoflush(EXPR)
892 If the C<$z> object is associated with a file or a filehandle, this method
893 returns the current autoflush setting for the underlying filehandle. If
894 C<EXPR> is present, and is non-zero, it will enable flushing after every
895 write/print operation.
897 If C<$z> is associated with a buffer, this method has no effect and always
900 B<Note> that the special variable C<$|> B<cannot> be used to set or
901 retrieve the autoflush setting.
903 =head2 input_line_number
905 $z->input_line_number()
906 $z->input_line_number(EXPR)
908 Returns the current uncompressed line number. If C<EXPR> is present it has
909 the effect of setting the line number. Note that setting the line number
910 does not change the current position within the file/buffer being read.
912 The contents of C<$/> are used to to determine what constitutes a line
920 If the C<$z> object is associated with a file or a filehandle, C<fileno>
921 will return the underlying file descriptor. Once the C<close> method is
922 called C<fileno> will return C<undef>.
924 If the C<$z> object is is associated with a buffer, this method will return
932 Closes the output file/buffer.
934 For most versions of Perl this method will be automatically invoked if
935 the IO::Uncompress::RawInflate object is destroyed (either explicitly or by the
936 variable with the reference to the object going out of scope). The
937 exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In
938 these cases, the C<close> method will be called automatically, but
939 not until global destruction of all live objects when the program is
942 Therefore, if you want your scripts to be able to run on all versions
943 of Perl, you should call C<close> explicitly and not rely on automatic
946 Returns true on success, otherwise 0.
948 If the C<AutoClose> option has been enabled when the IO::Uncompress::RawInflate
949 object was created, and the object is associated with a file, the
950 underlying file will also be closed.
956 my $status = $z->nextStream();
958 Skips to the next compressed data stream in the input file/buffer. If a new
959 compressed data stream is found, the eof marker will be cleared and C<$.>
962 Returns 1 if a new stream was found, 0 if none was found, and -1 if an
963 error was encountered.
969 my $data = $z->trailingData();
971 Returns the data, if any, that is present immediately after the compressed
972 data stream once uncompression is complete. It only makes sense to call
973 this method once the end of the compressed data stream has been
976 This option can be used when there is useful information immediately
977 following the compressed data stream, and you don't know the length of the
978 compressed data stream.
980 If the input is a buffer, C<trailingData> will return everything from the
981 end of the compressed data stream to the end of the buffer.
983 If the input is a filehandle, C<trailingData> will return the data that is
984 left in the filehandle input buffer once the end of the compressed data
985 stream has been reached. You can then use the filehandle to read the rest
988 Don't bother using C<trailingData> if the input is a filename.
990 If you know the length of the compressed data stream before you start
991 uncompressing, you can avoid having to use C<trailingData> by setting the
992 C<InputLength> option in the constructor.
996 No symbolic constants are required by this IO::Uncompress::RawInflate at present.
1002 Imports C<rawinflate> and C<$RawInflateError>.
1005 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
1011 =head2 Working with Net::FTP
1013 See L<IO::Uncompress::RawInflate::FAQ|IO::Uncompress::RawInflate::FAQ/"Compressed files and Net::FTP">
1017 L<Compress::Zlib>, L<IO::Compress::Gzip>, L<IO::Uncompress::Gunzip>, L<IO::Compress::Deflate>, L<IO::Uncompress::Inflate>, L<IO::Compress::RawDeflate>, L<IO::Compress::Bzip2>, L<IO::Uncompress::Bunzip2>, L<IO::Compress::Lzop>, L<IO::Uncompress::UnLzop>, L<IO::Compress::Lzf>, L<IO::Uncompress::UnLzf>, L<IO::Uncompress::AnyInflate>, L<IO::Uncompress::AnyUncompress>
1019 L<Compress::Zlib::FAQ|Compress::Zlib::FAQ>
1021 L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
1022 L<Archive::Tar|Archive::Tar>,
1023 L<IO::Zlib|IO::Zlib>
1025 For RFC 1950, 1951 and 1952 see
1026 F<http://www.faqs.org/rfcs/rfc1950.html>,
1027 F<http://www.faqs.org/rfcs/rfc1951.html> and
1028 F<http://www.faqs.org/rfcs/rfc1952.html>
1030 The I<zlib> compression library was written by Jean-loup Gailly
1031 F<gzip@prep.ai.mit.edu> and Mark Adler F<madler@alumni.caltech.edu>.
1033 The primary site for the I<zlib> compression library is
1034 F<http://www.zlib.org>.
1036 The primary site for gzip is F<http://www.gzip.org>.
1040 This module was written by Paul Marquess, F<pmqs@cpan.org>.
1042 =head1 MODIFICATION HISTORY
1044 See the Changes file.
1046 =head1 COPYRIGHT AND LICENSE
1048 Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
1050 This program is free software; you can redistribute it and/or
1051 modify it under the same terms as Perl itself.