| 1 |
Source: libuniversal-can-perl |
| 2 |
Maintainer: Debian Perl Group <[email protected]> |
| 3 |
Section: perl |
| 4 |
Testsuite: autopkgtest-pkg-perl |
| 5 |
Priority: optional |
| 6 |
Build-Depends: debhelper-compat (= 13) |
| 7 |
Build-Depends-Indep: perl |
| 8 |
Standards-Version: 3.9.5 |
| 9 |
Vcs-Browser: https://salsa.debian.org/perl-team/modules/packages/libuniversal-can-perl |
| 10 |
Vcs-Git: https://salsa.debian.org/perl-team/modules/packages/libuniversal-can-perl.git |
| 11 |
Homepage: https://metacpan.org/release/UNIVERSAL-can |
| 12 |
|
| 13 |
Package: libuniversal-can-perl |
| 14 |
Architecture: all |
| 15 |
Depends: ${misc:Depends}, |
| 16 |
${perl:Depends} |
| 17 |
Multi-Arch: foreign |
| 18 |
Description: safer version of UNIVERSAL::can |
| 19 |
The UNIVERSAL class provides a few default methods so that all objects can |
| 20 |
use them. Object orientation allows programmers to override these methods in |
| 21 |
subclasses to provide more specific and appropriate behavior. |
| 22 |
. |
| 23 |
Some authors call methods in the UNIVERSAL class on potential invocants as |
| 24 |
functions, bypassing any possible overriding. This is wrong and one should |
| 25 |
not do it. Unfortunately, not everyone heeds this warning and their bad code |
| 26 |
can break good code. |
| 27 |
. |
| 28 |
This module replaces UNIVERSAL::can() with a method that checks to see if |
| 29 |
the first argument is a valid invocant (whether an object -- a blessed |
| 30 |
referent -- or the name of a class). If so, and if the invocant's class has |
| 31 |
its own can() method, it calls that as a method. Otherwise, everything works |
| 32 |
as you might expect. |
| 33 |
. |
| 34 |
If someone attempts to call UNIVERSAL::can() as a function, this module will |
| 35 |
emit a lexical warning (see perllexwarn) to that effect. You can disable it |
| 36 |
with no warnings; or no warnings 'UNIVERSAL::isa';, but don't do that; fix |
| 37 |
the code instead. |