Name : perl-Class-Exporter
| |
Version : 0.03
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp156.8.1
| Date : 2024-07-03 17:52:38
|
Group : Development/Libraries/Perl
| Source RPM : perl-Class-Exporter-0.03-lp156.8.1.src.rpm
|
Size : 0.01 MB
| |
Packager : https://www_suse_com/
| |
Summary : Export class methods as regular subroutines
|
Description :
This module makes it much easier to make a module have a hybrid object/method interface similar to the one of CGI.pm. You can take any old module that has an object- oriented interface and convert it to have a hybrid interface by simply adding \"use base \'Class::Exporter\'\" to your code.
This package allows you to export object methods. It supports \'import()\', \'AATTEXPORT\' and \'AATTEXPORT_OK\' and not a whole lot else. Each package into which your object methods are imported gets its own instance of the object. This ensures that there are no interaction effects between multiple packages that use your object.
Setting up a module to export its variables and functions is simple:
package My::Module; use base \'Class::Exporter\';
AATTEXPORT = qw($Foo bar);
now when you \'use My::Module\', \'$Foo\' and \'bar()\' will show up.
In order to make exporting optional, use AATTEXPORT_OK.
package My::Module; use base \'Class::Exporter\';
AATTEXPORT_OK = qw($Foo bar);
when My::Module is used, \'$Foo\' and \'bar()\' will _not_ show up. You have to ask for them. \'use My::Module qw($Foo bar)\'.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl:/CPAN-C/15.6/noarch |