Logoj0ke.net Open Build Service > Projects > server:monitoring > nagios-plugins-nwc-health > Binaries > nagios-plugins-nwc-health-8... > Dependencies
Sign Up | Log In

Dependency of nagios-plugins-nwc-health-8.0-1.1.src.rpm

Name: perl-aliased

Project: openSUSE_13.2

Repository: oss

Title: 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.

Version: 0.31

Release: 4.1.3

Architecture: noarch

Size: 14.2 KB

Build Time: 2014-10-06 15:14:08 +0200 (over 9 years ago)

Requires

Symbol Provided by
perl(:MODULE_COMPAT_5.20.1) perl