Bug#366246: ITP: libuniversal-can-perl -- Safer version of UNIVERSAL::can

Krzysztof Krzyzaniak (eloy) eloy at debian.org
Sat May 6 13:07:47 UTC 2006


Package: wnpp
Severity: wishlist
Owner: "Krzysztof Krzyzaniak (eloy)" <eloy at debian.org>

* Package name    : libuniversal-can-perl
  Version         : 1.12
  Upstream Author : chromatic <chromatic at wgz.org>
* URL             : http://search.cpan.org/~chromatic/UNIVERSAL-can-1.12/
* License         : Perl: Artstic/GPL
  Programming Lang: Perl
  Description     : Safer version of UNIVERSAL::can

 The UNIVERSAL class provides a few default methods so that all objects can
 use them. Object orientation allows programmers to override these methods in
 subclasses to provide more specific and appropriate behavior.
 .
 Some authors call methods in the UNIVERSAL class on potential invocants as
 functions, bypassing any possible overriding. This is wrong and one should
 not do it. Unfortunately, not everyone heeds this warning and their bad code
 can break good code.
 .
 This module replaces UNIVERSAL::can() with a method that checks to see if
 the first argument is a valid invocant (whether an object -- a blessed
 referent -- or the name of a class). If so, and if the invocant's class has
 its own can() method, it calls that as a method. Otherwise, everything works
 as you might expect.
 .
 If someone attempts to call UNIVERSAL::can() as a function, this module will
 emit a lexical warning (see perllexwarn) to that effect. You can disable it
 with no warnings; or no warnings 'UNIVERSAL::can';, but don't do that; fix
 the code instead.
   

NOTE: this module and libuniversal-isa-perl are needed to upload new version
of libtest-mockobject-perl

-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16-1-686
Locale: LANG=pl_PL, LC_CTYPE=pl_PL (charmap=ISO-8859-2)




More information about the pkg-perl-maintainers mailing list