Your message dated Fri, 8 Feb 2008 11:22:44 -0600
with message-id <[EMAIL PROTECTED]>
and subject line Looks clear to me...
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

--- Begin Message ---
Package: libcompress-zlib-perl
Version: 1.34-1
Severity: normal

The manual page for Compress::Zlib is confusing when it comes to the
section about compress() and uncompress().  It lists the $source
argument, without explaining what it is supposed to represent.  Is it
a buffer or a file descriptor, for example?  If it is a buffer, how is
it different from the $buffer argument for memGzip() and memGunzip()?

This quite is an example on what I am talking about:

    $dest = compress($source [, $level] ) ;
            Compresses $source. If successful it returns the compressed data.
            Otherwise it returns undef.

            The source buffer can either be a scalar or a scalar reference.

I miss some more information about $source here.  Can it be a
filehandle?

-- System Information:
Debian Release: 3.1
Architecture: i386 (i686)
Kernel: Linux 2.6.8-2-386
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)

Versions of packages libcompress-zlib-perl depends on:
ii  libc6                  2.3.2.ds1-22      GNU C Library: Shared libraries an
ii  perl                   5.8.4-8           Larry Wall's Practical Extraction
ii  perl-base [perlapi-5.8 5.8.4-8           The Pathologically Eclectic Rubbis
ii  zlib1g                 1:1.2.2-4.sarge.1 compression library - runtime

-- no debconf information


--- End Message ---
--- Begin Message ---
Throughout the documentation, it is repeated in several places, just
as you quote:

    The source buffer, $source, can either be a scalar or a scalar reference.

In Perl, filehandles are not scalars :-) So, this works (scalar):

    perl -e 'use Compress::Zlib; open($in, "/etc/motd"); $data = join("", 
<$in>); print uncompress(compress($data, 9))'

This also works (scalar reference):

    perl -e 'use Compress::Zlib; open($in, "/etc/motd"); $data = join("", 
<$in>); print uncompress(compress(\$data, 9))'

This, of course, does not work (scalar reference reference)

    perl -e 'use Compress::Zlib; open($in, "/etc/motd"); $data = join("", 
<$in>); print uncompress(compress(\\$data, 9))'

And no, this does not work (filehandle):

    perl -e 'use Compress::Zlib; open($in, "/etc/motd"); print 
uncompress(compress($in, 9))'

So... The only thing that amazes me is that nobody touched this bug in
three years and a half ;-) I'm closing it.

-- 
Gunnar Wolf - [EMAIL PROTECTED] - (+52-55)5623-0154 / 1451-2244
PGP key 1024D/8BB527AF 2001-10-23
Fingerprint: 0C79 D2D1 2C4E 9CE4 5973  F800 D80E F35A 8BB5 27AF


--- End Message ---

Reply via email to