Name : perl-SUPER
| |
Version : 1.20190531
| Vendor : obs://build_opensuse_org/home:smithfarm
|
Release : lp155.30.1
| Date : 2024-09-05 15:44:57
|
Group : Development/Libraries/Perl
| Source RPM : perl-SUPER-1.20190531-lp155.30.1.src.rpm
|
Size : 0.03 MB
| |
Packager : https://www_suse_com/
| |
Summary : Control superclass method dispatch
|
Description :
When subclassing a class, you occasionally want to dispatch control to the superclass -- at least conditionally and temporarily. The Perl syntax for calling your superclass is ugly and unwieldy:
$self->SUPER::method(AATT_);
especially when compared to its Ruby equivalent:
super;
It\'s even worse in that the normal Perl redispatch mechanism only dispatches to the parent of the class containing the method _at compile time_. That doesn\'t work very well for mixins and roles.
This module provides nicer equivalents, along with the universal method \'super\' to determine a class\' own superclass. This allows you to do things such as:
goto &{$_[0]->super(\'my_method\')};
if you don\'t like wasting precious stack frames.
If you are using roles or mixins or otherwise pulling in methods from other packages that need to dispatch to their super methods, or if you want to pass different arguments to the super method, use the \'SUPER()\' method:
$self->SUPER( qw( other arguments here ) );
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/home:/smithfarm/15.5/noarch |