Bug#415969: libsys-syslog-perl: namespace pollution
Justin B Rye
jbr at edlug.org.uk
Fri Mar 23 14:19:23 UTC 2007
This package uses the same module name as the Sys::Syslog included
as /usr/lib/perl/5.8.8/Sys/Syslog.pm in the package perl itself, but
puts it in /usr/lib/perl5.
When the admin installs mailscanner (Depends: libsys-syslog-perl),
users' scripts that call "use Sys::Syslog" silently change
behaviour. In my own case, the closelog() function started giving
me new error messages like this one:
jbr at hurakan:~$ perl -MSys::Syslog -we 'openlog qw(va pid); closelog'
Use of uninitialized value in string eq at /usr/lib/perl5/Sys/Syslog.pm line 631.
(That's a second bug.) Fortunately I spotted the ".../perl5/...";
otherwise it would have been even more confusing. As it was, "man
Sys::Syslog" was telling me about the wrong version (this package
contains no manpage - bug three).
Why does this package even exist? Do we in fact know that packages
that depend on it such as mailscanner, ps-watcher etc need anything
more than /usr/lib/perl/5.8.8/Sys/Syslog.pm? If they do, it seems
to me it should mean either
a) mailscanner depends on perl >> something
b) mailscanner depends on a co-installable fork, Sys::Syslog2
or as an absolute last resort,
z) some sort of warning is given in the package description that
these libraries stomp all over perl's namespace
And that's only a mitigating workaround, not a fix. It will only
help at all if sysadmins routinely scrutinise the long descriptions
on library packages before letting them be automatically installed,
and that's an unreasonable thing to expect.
-- System Information:
Debian Release: 4.0
APT prefers testing
APT policy: (500, 'testing')
Architecture: i386 (i586)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.18.hurakan
Locale: LANG=C, LC_CTYPE=C (charmap=ANSI_X3.4-1968)
Versions of packages libsys-syslog-perl depends on:
ii perl 5.8.8-7 Larry Wall's Practical Extraction
ii perl-base [perlapi-5.8.8] 5.8.8-7 The Pathologically Eclectic Rubbis
libsys-syslog-perl recommends no packages.
-- no debconf information
More information about the pkg-perl-maintainers