Hack around people calling UNIVERSAL::can() as a function
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 you should not
do it. Unfortunately, not everyone heeds this warning and their bad code can
break your good code.
This module replaces UNIVERSAL::can() with a method that checks to see if the
first argument is a valid invocant has its own can() method. If so, it gives a
warning and calls the overridden method, working around buggy code. Otherwise,
everything works as you might expect.
- Sources inherited from project SUSE:SLE-15-SP7:GA
- Download package
-
Checkout Package
osc -A https://api.opensuse.org checkout SUSE:SLE-15-SP7:Update/perl-UNIVERSAL-can && cd $_
- Create Badge
Source Files
Filename | Size | Changed |
---|---|---|
UNIVERSAL-can-1.20140328.tar.gz | 0000014654 14.3 KB | |
perl-UNIVERSAL-can.changes | 0000001030 1.01 KB | |
perl-UNIVERSAL-can.spec | 0000002917 2.85 KB |
Latest Revision
bugowner: group:qe-tools-team Add/update package to be able to eventually submit openQA This is the 2nd batch of packages after perl-PadWalker. All those packages should go into the same staging. further details: https://progress.opensuse.org/issues/128318
Comments 0