Name : perl-aliased
| |
Version : 0.34
| Vendor : openSUSE
|
Release : bp156.3.1
| Date : 2023-07-22 11:26:16
|
Group : Development/Libraries/Perl
| Source RPM : perl-aliased-0.34-bp156.3.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://bugs_opensuse_org
| |
Summary : Use shorter versions of class names
|
Description :
\'aliased\' is simple in concept but is a rather handy module. It loads the class you specify and exports into your namespace a subroutine that returns the class name. You can explicitly alias the class to another name or, if you prefer, you can do so implicitly. In the latter case, the name of the subroutine is the last part of the class name. Thus, it does something similar to the following:
use Some::Annoyingly::Long::Module::Name::Customer; sub Customer { return \'Some::Annoyingly::Long::Module::Name::Customer\'; } my $cust = Customer->new;
This module is useful if you prefer a shorter name for a class. It\'s also handy if a class has been renamed.
(Some may object to the term \"aliasing\" because we\'re not aliasing one namespace to another, but it\'s a handy term. Just keep in mind that this is done with a subroutine and not with typeglobs and weird namespace munging.)
Note that this is *only* for \'use\'ing OO modules. You cannot use this to load procedural modules. See the the Why OO Only? manpage section. Also, don\'t let the version number fool you. This code is ridiculously simple and is just fine for most use.
|
RPM found in directory: /vol/rzm3/linux-opensuse/distribution/leap/15.6/repo/oss/noarch |