Name : perl-aliased
| |
Version : 0.34
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp154.1.1
| Date : 2023-01-27 16:02:04
|
Group : Development/Libraries/Perl
| Source RPM : perl-aliased-0.34-lp154.1.1.src.rpm
|
Size : 0.04 MB
| |
Packager : https://www_suse_com/
| |
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 Why OO Only? 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: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-A/15.4/noarch |