How to Install and Uninstall perl-UNIVERSAL-can Package on openSUSE Leap
Last updated: December 25,2024
1. Install "perl-UNIVERSAL-can" package
Please follow the instructions below to install perl-UNIVERSAL-can on openSUSE Leap
$
sudo zypper refresh
Copied
$
sudo zypper install
perl-UNIVERSAL-can
Copied
2. Uninstall "perl-UNIVERSAL-can" package
This guide covers the steps necessary to uninstall perl-UNIVERSAL-can on openSUSE Leap:
$
sudo zypper remove
perl-UNIVERSAL-can
Copied
3. Information about the perl-UNIVERSAL-can package on openSUSE Leap
Information for package perl-UNIVERSAL-can:
-------------------------------------------
Repository : Main Repository
Name : perl-UNIVERSAL-can
Version : 1.20140328-bp155.2.12
Arch : noarch
Vendor : openSUSE
Installed Size : 27.7 KiB
Installed : No
Status : not installed
Source package : perl-UNIVERSAL-can-1.20140328-bp155.2.12.src
Upstream URL : http://search.cpan.org/dist/UNIVERSAL-can/
Summary : work around buggy code calling UNIVERSAL::can() as a function
Description :
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.
Some people argue that you must call 'UNIVERSAL::can()' as a function
because you don't know if your proposed invocant is a valid invocant.
That's silly. Use 'blessed()' from the Scalar::Util manpage if you want to
check that the potential invocant is an object or call the method anyway in
an 'eval' block and check for failure (though check the exception
_returned_, as a poorly-written 'can()' method could break Liskov and throw
an exception other than "You can't call a method on this type of
invocant").
Just don't break working code.
-------------------------------------------
Repository : Main Repository
Name : perl-UNIVERSAL-can
Version : 1.20140328-bp155.2.12
Arch : noarch
Vendor : openSUSE
Installed Size : 27.7 KiB
Installed : No
Status : not installed
Source package : perl-UNIVERSAL-can-1.20140328-bp155.2.12.src
Upstream URL : http://search.cpan.org/dist/UNIVERSAL-can/
Summary : work around buggy code calling UNIVERSAL::can() as a function
Description :
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.
Some people argue that you must call 'UNIVERSAL::can()' as a function
because you don't know if your proposed invocant is a valid invocant.
That's silly. Use 'blessed()' from the Scalar::Util manpage if you want to
check that the potential invocant is an object or call the method anyway in
an 'eval' block and check for failure (though check the exception
_returned_, as a poorly-written 'can()' method could break Liskov and throw
an exception other than "You can't call a method on this type of
invocant").
Just don't break working code.