Name : perl-Class-Constructor
| |
Version : 1.1.4
| Vendor : obs://build_opensuse_org/devel:languages:perl
|
Release : lp150.3.2
| Date : 2011-04-14 14:00:00
|
Group : Development/Libraries/Perl
| Source RPM : perl-Class-Constructor-1.1.4-lp150.3.2.src.rpm
|
Size : 0.02 MB
| |
Packager : (none)
| |
Summary : Simplify the creation of object constructors
|
Description :
Simplifies the creation of object constructors.
Instead of writing:
sub new { my $proto = shift; my $class = ref $proto || $proto; my $self = {}; bless $self, $class;
my %args = AATT_; foreach my $attr (\'first_attribute\', \'second_attribute\') { $self->$attr($args{$attr}); }
$self->_init();
return $self; }
You can just write:
CLASS->mk_constructor( Auto_Init => [ \'first_attribute\', \'second_attribute\' ], );
There are other features as well:
* Automatically call other initialization methods.
Using the \'Init_Methods\' method of \'mk_constructor\', you can have your constructor method automatically call one or more initialization methods.
* Automatic Construction of objects of Subclasses
Your constructor can bless objects into one of its subclasses.
For instance, the \'Fruit\' class could bless objects into the \'Fruit::Apple\' or \'Fruit::Orange\' classes depending on a parameter passed to the constructor.
See the Subclass_Param manpage for details.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/devel:/languages:/perl/openSUSE_Leap_15.0/noarch |
Hmm ... It's impossible ;-) This RPM doesn't exist on any FTP server
Provides :
perl(Class::Constructor)
perl-Class-Constructor
Requires :