1 package IO::Uncompress::RawInflate ;
8 use Compress::Raw::Zlib 2.009 ;
9 use IO::Compress::Base::Common 2.009 qw(:Status createSelfTiedObject);
11 use IO::Uncompress::Base 2.009 ;
12 use IO::Uncompress::Adapter::Inflate 2.009 ;
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(@_);
64 my ($obj, $errstr, $errno) = IO::Uncompress::Adapter::Inflate::mkUncompObject(
66 $got->value('ADLER32'),
70 return $self->saveErrorString(undef, $errstr, $errno)
73 *$self->{Uncomp} = $obj;
75 my $magic = $self->ckMagic()
78 *$self->{Info} = $self->readHeader($magic)
90 return $self->_isRaw() ;
100 'FingerprintLength' => 0,
102 'TrailerLength' => 0,
116 my $got = $self->_isRawx(@_);
119 *$self->{Pending} = *$self->{HeaderPending} ;
122 $self->pushBack(*$self->{HeaderPending});
123 *$self->{Uncomp}->reset();
125 *$self->{HeaderPending} = '';
135 $magic = '' unless defined $magic ;
139 $self->smartRead(\$buffer, *$self->{BlockSize}) >= 0
140 or return $self->saveErrorString(undef, "No data to read");
142 my $temp_buf = $magic . $buffer ;
143 *$self->{HeaderPending} = $temp_buf ;
145 my $status = *$self->{Uncomp}->uncompr(\$temp_buf, \$buffer, $self->smartEof()) ;
146 return $self->saveErrorString(undef, *$self->{Uncomp}{Error}, STATUS_ERROR)
147 if $status == STATUS_ERROR;
149 #my $buf_len = *$self->{Uncomp}->uncompressedBytes();
150 my $buf_len = length $buffer;
152 if ($status == STATUS_ENDSTREAM) {
153 if (*$self->{MultiStream}
154 && (length $temp_buf || ! $self->smartEof())){
155 *$self->{NewStream} = 1 ;
156 *$self->{EndStream} = 0 ;
157 $self->pushBack($temp_buf);
160 *$self->{EndStream} = 1 ;
161 $self->pushBack($temp_buf);
164 *$self->{HeaderPending} = $buffer ;
165 *$self->{InflatedBytesRead} = $buf_len ;
166 *$self->{TotalInflatedBytesRead} += $buf_len ;
167 *$self->{Type} = 'rfc1951';
169 $self->saveStatus(STATUS_OK);
174 'TrailerLength' => 0,
184 # inflateSync is a no-op in Plain mode
188 return 0 if *$self->{Closed} ;
189 #return G_EOF if !length *$self->{Pending} && *$self->{EndStream} ;
190 return 0 if ! length *$self->{Pending} && *$self->{EndStream} ;
193 *$self->{Strict} = 0 ;
200 if (length *$self->{Pending} )
202 $temp_buf = *$self->{Pending} ;
203 *$self->{Pending} = '';
207 $status = $self->smartRead(\$temp_buf, *$self->{BlockSize}) ;
208 return $self->saveErrorString(0, "Error Reading Data")
212 *$self->{EndStream} = 1 ;
213 return $self->saveErrorString(0, "unexpected end of file", STATUS_ERROR);
217 $status = *$self->{Uncomp}->sync($temp_buf) ;
219 if ($status == STATUS_OK)
221 *$self->{Pending} .= $temp_buf ;
225 last unless $status == STATUS_ERROR ;
236 # my $end_offset = 0;
238 # $status = $self->scan()
239 # #or return $self->saveErrorString(undef, "Error Scanning: $$error_ref", $self->errorNo) ;
240 # or return $self->saveErrorString(G_ERR, "Error Scanning: $status")
242 # $status = $self->zap($end_offset)
243 # or return $self->saveErrorString(G_ERR, "Error Zapping: $status");
244 # #or return $self->saveErrorString(undef, "Error Zapping: $$error_ref", $self->errorNo) ;
246 # #(*$obj->{Deflate}, $status) = $inf->createDeflate();
248 ## *$obj->{Header} = *$inf->{Info}{Header};
249 ## *$obj->{UnCompSize_32bit} =
250 ## *$obj->{BytesWritten} = *$inf->{UnCompSize_32bit} ;
251 ## *$obj->{CompSize_32bit} = *$inf->{CompSize_32bit} ;
254 ## if ( $outType eq 'buffer')
255 ## { substr( ${ *$self->{Buffer} }, $end_offset) = '' }
256 ## elsif ($outType eq 'handle' || $outType eq 'filename') {
257 ## *$self->{FH} = *$inf->{FH} ;
258 ## delete *$inf->{FH};
259 ## *$obj->{FH}->flush() ;
260 ## *$obj->{Handle} = 1 if $outType eq 'handle';
262 ## #seek(*$obj->{FH}, $end_offset, SEEK_SET)
263 ## *$obj->{FH}->seek($end_offset, SEEK_SET)
264 ## or return $obj->saveErrorString(undef, $!, $!) ;
273 return 1 if *$self->{Closed} ;
274 return 1 if !length *$self->{Pending} && *$self->{EndStream} ;
279 $len = $self->_raw_read(\$buffer, 1)
280 while ! *$self->{EndStream} && $len >= 0 ;
282 #return $len if $len < 0 ? $len : 0 ;
283 return $len < 0 ? 0 : 1 ;
290 my $headerLength = *$self->{Info}{HeaderLength};
291 my $block_offset = $headerLength + *$self->{Uncomp}->getLastBlockOffset();
292 $_[0] = $headerLength + *$self->{Uncomp}->getEndOffset();
293 #printf "# End $_[0], headerlen $headerLength \n";;
294 #printf "# block_offset $block_offset %x\n", $block_offset;
296 ( $self->smartSeek($block_offset) &&
297 $self->smartRead(\$byte, 1) )
298 or return $self->saveErrorString(0, $!, $!);
300 #printf "#byte is %x\n", unpack('C*',$byte);
301 *$self->{Uncomp}->resetLastBlockByte($byte);
302 #printf "#to byte is %x\n", unpack('C*',$byte);
304 ( $self->smartSeek($block_offset) &&
305 $self->smartWrite($byte) )
306 or return $self->saveErrorString(0, $!, $!);
308 #$self->smartSeek($end_offset, 1);
316 my ($def, $status) = *$self->{Uncomp}->createDeflateStream(
318 -WindowBits => - MAX_WBITS,
319 -CRC32 => *$self->{Params}->value('CRC32'),
320 -ADLER32 => *$self->{Params}->value('ADLER32'),
323 return wantarray ? ($status, $def) : $def ;
334 IO::Uncompress::RawInflate - Read RFC 1951 files/buffers
338 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
340 my $status = rawinflate $input => $output [,OPTS]
341 or die "rawinflate failed: $RawInflateError\n";
343 my $z = new IO::Uncompress::RawInflate $input [OPTS]
344 or die "rawinflate failed: $RawInflateError\n";
346 $status = $z->read($buffer)
347 $status = $z->read($buffer, $length)
348 $status = $z->read($buffer, $length, $offset)
349 $line = $z->getline()
354 $status = $z->inflateSync()
356 $data = $z->trailingData()
357 $status = $z->nextStream()
358 $data = $z->getHeaderInfo()
360 $z->seek($position, $whence)
372 read($z, $buffer, $length);
373 read($z, $buffer, $length, $offset);
375 seek($z, $position, $whence)
383 This module provides a Perl interface that allows the reading of
384 files/buffers that conform to RFC 1951.
386 For writing RFC 1951 files/buffers, see the companion module IO::Compress::RawDeflate.
388 =head1 Functional Interface
390 A top-level function, C<rawinflate>, is provided to carry out
391 "one-shot" uncompression between buffers and/or files. For finer
392 control over the uncompression process, see the L</"OO Interface">
395 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
397 rawinflate $input => $output [,OPTS]
398 or die "rawinflate failed: $RawInflateError\n";
400 The functional interface needs Perl5.005 or better.
402 =head2 rawinflate $input => $output [, OPTS]
404 C<rawinflate> expects at least two parameters, C<$input> and C<$output>.
406 =head3 The C<$input> parameter
408 The parameter, C<$input>, is used to define the source of
411 It can take one of the following forms:
417 If the C<$input> parameter is a simple scalar, it is assumed to be a
418 filename. This file will be opened for reading and the input data
419 will be read from it.
423 If the C<$input> parameter is a filehandle, the input data will be
425 The string '-' can be used as an alias for standard input.
427 =item A scalar reference
429 If C<$input> is a scalar reference, the input data will be read
432 =item An array reference
434 If C<$input> is an array reference, each element in the array must be a
437 The input data will be read from each file in turn.
439 The complete array will be walked to ensure that it only
440 contains valid filenames before any data is uncompressed.
442 =item An Input FileGlob string
444 If C<$input> is a string that is delimited by the characters "<" and ">"
445 C<rawinflate> will assume that it is an I<input fileglob string>. The
446 input is the list of files that match the fileglob.
448 If the fileglob does not match any files ...
450 See L<File::GlobMapper|File::GlobMapper> for more details.
454 If the C<$input> parameter is any other type, C<undef> will be returned.
456 =head3 The C<$output> parameter
458 The parameter C<$output> is used to control the destination of the
459 uncompressed data. This parameter can take one of these forms.
465 If the C<$output> parameter is a simple scalar, it is assumed to be a
466 filename. This file will be opened for writing and the uncompressed
467 data will be written to it.
471 If the C<$output> parameter is a filehandle, the uncompressed data
472 will be written to it.
473 The string '-' can be used as an alias for standard output.
475 =item A scalar reference
477 If C<$output> is a scalar reference, the uncompressed data will be
478 stored in C<$$output>.
480 =item An Array Reference
482 If C<$output> is an array reference, the uncompressed data will be
483 pushed onto the array.
485 =item An Output FileGlob
487 If C<$output> is a string that is delimited by the characters "<" and ">"
488 C<rawinflate> will assume that it is an I<output fileglob string>. The
489 output is the list of files that match the fileglob.
491 When C<$output> is an fileglob string, C<$input> must also be a fileglob
492 string. Anything else is an error.
496 If the C<$output> parameter is any other type, C<undef> will be returned.
500 When C<$input> maps to multiple compressed files/buffers and C<$output> is
501 a single file/buffer, after uncompression C<$output> will contain a
502 concatenation of all the uncompressed data from each of the input
505 =head2 Optional Parameters
507 Unless specified below, the optional parameters for C<rawinflate>,
508 C<OPTS>, are the same as those used with the OO interface defined in the
509 L</"Constructor Options"> section below.
513 =item C<< AutoClose => 0|1 >>
515 This option applies to any input or output data streams to
516 C<rawinflate> that are filehandles.
518 If C<AutoClose> is specified, and the value is true, it will result in all
519 input and/or output filehandles being closed once C<rawinflate> has
522 This parameter defaults to 0.
524 =item C<< BinModeOut => 0|1 >>
526 When writing to a file or filehandle, set C<binmode> before writing to the
531 =item C<< Append => 0|1 >>
535 =item C<< MultiStream => 0|1 >>
537 This option is a no-op.
539 =item C<< TrailingData => $scalar >>
541 Returns the data, if any, that is present immediately after the compressed
542 data stream once uncompression is complete.
544 This option can be used when there is useful information immediately
545 following the compressed data stream, and you don't know the length of the
546 compressed data stream.
548 If the input is a buffer, C<trailingData> will return everything from the
549 end of the compressed data stream to the end of the buffer.
551 If the input is a filehandle, C<trailingData> will return the data that is
552 left in the filehandle input buffer once the end of the compressed data
553 stream has been reached. You can then use the filehandle to read the rest
556 Don't bother using C<trailingData> if the input is a filename.
558 If you know the length of the compressed data stream before you start
559 uncompressing, you can avoid having to use C<trailingData> by setting the
560 C<InputLength> option.
566 To read the contents of the file C<file1.txt.1951> and write the
567 compressed data to the file C<file1.txt>.
571 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
573 my $input = "file1.txt.1951";
574 my $output = "file1.txt";
575 rawinflate $input => $output
576 or die "rawinflate failed: $RawInflateError\n";
578 To read from an existing Perl filehandle, C<$input>, and write the
579 uncompressed data to a buffer, C<$buffer>.
583 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
586 my $input = new IO::File "<file1.txt.1951"
587 or die "Cannot open 'file1.txt.1951': $!\n" ;
589 rawinflate $input => \$buffer
590 or die "rawinflate failed: $RawInflateError\n";
592 To uncompress all files in the directory "/my/home" that match "*.txt.1951" and store the compressed data in the same directory
596 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
598 rawinflate '</my/home/*.txt.1951>' => '</my/home/#1.txt>'
599 or die "rawinflate failed: $RawInflateError\n";
601 and if you want to compress each file one at a time, this will do the trick
605 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
607 for my $input ( glob "/my/home/*.txt.1951" )
610 $output =~ s/.1951// ;
611 rawinflate $input => $output
612 or die "Error compressing '$input': $RawInflateError\n";
619 The format of the constructor for IO::Uncompress::RawInflate is shown below
621 my $z = new IO::Uncompress::RawInflate $input [OPTS]
622 or die "IO::Uncompress::RawInflate failed: $RawInflateError\n";
624 Returns an C<IO::Uncompress::RawInflate> object on success and undef on failure.
625 The variable C<$RawInflateError> will contain an error message on failure.
627 If you are running Perl 5.005 or better the object, C<$z>, returned from
628 IO::Uncompress::RawInflate can be used exactly like an L<IO::File|IO::File> filehandle.
629 This means that all normal input file operations can be carried out with
630 C<$z>. For example, to read a line from a compressed file/buffer you can
631 use either of these forms
633 $line = $z->getline();
636 The mandatory parameter C<$input> is used to determine the source of the
637 compressed data. This parameter can take one of three forms.
643 If the C<$input> parameter is a scalar, it is assumed to be a filename. This
644 file will be opened for reading and the compressed data will be read from it.
648 If the C<$input> parameter is a filehandle, the compressed data will be
650 The string '-' can be used as an alias for standard input.
652 =item A scalar reference
654 If C<$input> is a scalar reference, the compressed data will be read from
659 =head2 Constructor Options
661 The option names defined below are case insensitive and can be optionally
662 prefixed by a '-'. So all of the following are valid
669 OPTS is a combination of the following options:
673 =item C<< AutoClose => 0|1 >>
675 This option is only valid when the C<$input> parameter is a filehandle. If
676 specified, and the value is true, it will result in the file being closed once
677 either the C<close> method is called or the IO::Uncompress::RawInflate object is
680 This parameter defaults to 0.
682 =item C<< MultiStream => 0|1 >>
684 Allows multiple concatenated compressed streams to be treated as a single
685 compressed stream. Decompression will stop once either the end of the
686 file/buffer is reached, an error is encountered (premature eof, corrupt
687 compressed data) or the end of a stream is not immediately followed by the
688 start of another stream.
690 This parameter defaults to 0.
692 =item C<< Prime => $string >>
694 This option will uncompress the contents of C<$string> before processing the
697 This option can be useful when the compressed data is embedded in another
698 file/data structure and it is not possible to work out where the compressed
699 data begins without having to read the first few bytes. If this is the
700 case, the uncompression can be I<primed> with these bytes using this
703 =item C<< Transparent => 0|1 >>
705 If this option is set and the input file/buffer is not compressed data,
706 the module will allow reading of it anyway.
708 In addition, if the input file/buffer does contain compressed data and
709 there is non-compressed data immediately following it, setting this option
710 will make this module treat the whole file/bufffer as a single data stream.
712 This option defaults to 1.
714 =item C<< BlockSize => $num >>
716 When reading the compressed input data, IO::Uncompress::RawInflate will read it in
717 blocks of C<$num> bytes.
719 This option defaults to 4096.
721 =item C<< InputLength => $size >>
723 When present this option will limit the number of compressed bytes read
724 from the input file/buffer to C<$size>. This option can be used in the
725 situation where there is useful data directly after the compressed data
726 stream and you know beforehand the exact length of the compressed data
729 This option is mostly used when reading from a filehandle, in which case
730 the file pointer will be left pointing to the first byte directly after the
731 compressed data stream.
733 This option defaults to off.
735 =item C<< Append => 0|1 >>
737 This option controls what the C<read> method does with uncompressed data.
739 If set to 1, all uncompressed data will be appended to the output parameter
740 of the C<read> method.
742 If set to 0, the contents of the output parameter of the C<read> method
743 will be overwritten by the uncompressed data.
747 =item C<< Strict => 0|1 >>
749 This option is a no-op.
763 $status = $z->read($buffer)
765 Reads a block of compressed data (the size the the compressed block is
766 determined by the C<Buffer> option in the constructor), uncompresses it and
767 writes any uncompressed data into C<$buffer>. If the C<Append> parameter is
768 set in the constructor, the uncompressed data will be appended to the
769 C<$buffer> parameter. Otherwise C<$buffer> will be overwritten.
771 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
772 or a negative number on error.
778 $status = $z->read($buffer, $length)
779 $status = $z->read($buffer, $length, $offset)
781 $status = read($z, $buffer, $length)
782 $status = read($z, $buffer, $length, $offset)
784 Attempt to read C<$length> bytes of uncompressed data into C<$buffer>.
786 The main difference between this form of the C<read> method and the
787 previous one, is that this one will attempt to return I<exactly> C<$length>
788 bytes. The only circumstances that this function will not is if end-of-file
789 or an IO error is encountered.
791 Returns the number of uncompressed bytes written to C<$buffer>, zero if eof
792 or a negative number on error.
798 $line = $z->getline()
803 This method fully supports the use of of the variable C<$/> (or
804 C<$INPUT_RECORD_SEPARATOR> or C<$RS> when C<English> is in use) to
805 determine what constitutes an end of line. Paragraph mode, record mode and
806 file slurp mode are all supported.
814 Read a single character.
820 $char = $z->ungetc($string)
826 $status = $z->inflateSync()
834 $hdr = $z->getHeaderInfo();
835 @hdrs = $z->getHeaderInfo();
837 This method returns either a hash reference (in scalar context) or a list
838 or hash references (in array context) that contains information about each
839 of the header fields in the compressed data stream(s).
848 Returns the uncompressed file offset.
857 Returns true if the end of the compressed input stream has been reached.
861 $z->seek($position, $whence);
862 seek($z, $position, $whence);
864 Provides a sub-set of the C<seek> functionality, with the restriction
865 that it is only legal to seek forward in the input file/buffer.
866 It is a fatal error to attempt to seek backward.
868 The C<$whence> parameter takes one the usual values, namely SEEK_SET,
869 SEEK_CUR or SEEK_END.
871 Returns 1 on success, 0 on failure.
880 This is a noop provided for completeness.
886 Returns true if the object currently refers to a opened file/buffer.
890 my $prev = $z->autoflush()
891 my $prev = $z->autoflush(EXPR)
893 If the C<$z> object is associated with a file or a filehandle, this method
894 returns the current autoflush setting for the underlying filehandle. If
895 C<EXPR> is present, and is non-zero, it will enable flushing after every
896 write/print operation.
898 If C<$z> is associated with a buffer, this method has no effect and always
901 B<Note> that the special variable C<$|> B<cannot> be used to set or
902 retrieve the autoflush setting.
904 =head2 input_line_number
906 $z->input_line_number()
907 $z->input_line_number(EXPR)
909 Returns the current uncompressed line number. If C<EXPR> is present it has
910 the effect of setting the line number. Note that setting the line number
911 does not change the current position within the file/buffer being read.
913 The contents of C<$/> are used to to determine what constitutes a line
921 If the C<$z> object is associated with a file or a filehandle, C<fileno>
922 will return the underlying file descriptor. Once the C<close> method is
923 called C<fileno> will return C<undef>.
925 If the C<$z> object is is associated with a buffer, this method will return
933 Closes the output file/buffer.
935 For most versions of Perl this method will be automatically invoked if
936 the IO::Uncompress::RawInflate object is destroyed (either explicitly or by the
937 variable with the reference to the object going out of scope). The
938 exceptions are Perl versions 5.005 through 5.00504 and 5.8.0. In
939 these cases, the C<close> method will be called automatically, but
940 not until global destruction of all live objects when the program is
943 Therefore, if you want your scripts to be able to run on all versions
944 of Perl, you should call C<close> explicitly and not rely on automatic
947 Returns true on success, otherwise 0.
949 If the C<AutoClose> option has been enabled when the IO::Uncompress::RawInflate
950 object was created, and the object is associated with a file, the
951 underlying file will also be closed.
957 my $status = $z->nextStream();
959 Skips to the next compressed data stream in the input file/buffer. If a new
960 compressed data stream is found, the eof marker will be cleared and C<$.>
963 Returns 1 if a new stream was found, 0 if none was found, and -1 if an
964 error was encountered.
970 my $data = $z->trailingData();
972 Returns the data, if any, that is present immediately after the compressed
973 data stream once uncompression is complete. It only makes sense to call
974 this method once the end of the compressed data stream has been
977 This option can be used when there is useful information immediately
978 following the compressed data stream, and you don't know the length of the
979 compressed data stream.
981 If the input is a buffer, C<trailingData> will return everything from the
982 end of the compressed data stream to the end of the buffer.
984 If the input is a filehandle, C<trailingData> will return the data that is
985 left in the filehandle input buffer once the end of the compressed data
986 stream has been reached. You can then use the filehandle to read the rest
989 Don't bother using C<trailingData> if the input is a filename.
991 If you know the length of the compressed data stream before you start
992 uncompressing, you can avoid having to use C<trailingData> by setting the
993 C<InputLength> option in the constructor.
997 No symbolic constants are required by this IO::Uncompress::RawInflate at present.
1003 Imports C<rawinflate> and C<$RawInflateError>.
1006 use IO::Uncompress::RawInflate qw(rawinflate $RawInflateError) ;
1012 =head2 Working with Net::FTP
1014 See L<IO::Uncompress::RawInflate::FAQ|IO::Uncompress::RawInflate::FAQ/"Compressed files and Net::FTP">
1018 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>
1020 L<Compress::Zlib::FAQ|Compress::Zlib::FAQ>
1022 L<File::GlobMapper|File::GlobMapper>, L<Archive::Zip|Archive::Zip>,
1023 L<Archive::Tar|Archive::Tar>,
1024 L<IO::Zlib|IO::Zlib>
1026 For RFC 1950, 1951 and 1952 see
1027 F<http://www.faqs.org/rfcs/rfc1950.html>,
1028 F<http://www.faqs.org/rfcs/rfc1951.html> and
1029 F<http://www.faqs.org/rfcs/rfc1952.html>
1031 The I<zlib> compression library was written by Jean-loup Gailly
1032 F<gzip@prep.ai.mit.edu> and Mark Adler F<madler@alumni.caltech.edu>.
1034 The primary site for the I<zlib> compression library is
1035 F<http://www.zlib.org>.
1037 The primary site for gzip is F<http://www.gzip.org>.
1041 This module was written by Paul Marquess, F<pmqs@cpan.org>.
1043 =head1 MODIFICATION HISTORY
1045 See the Changes file.
1047 =head1 COPYRIGHT AND LICENSE
1049 Copyright (c) 2005-2008 Paul Marquess. All rights reserved.
1051 This program is free software; you can redistribute it and/or
1052 modify it under the same terms as Perl itself.