Anansi-Class
view release on metacpan or search on metacpan
lib/Anansi/Class.pm view on Meta::CPAN
sub new {
my ($class, %parameters) = @_;
return if(ref($class) =~ /^(ARRAY|CODE|FORMAT|GLOB|HASH|IO|LVALUE|REF|Regexp|SCALAR|VSTRING)$/i);
$class = ref($class) if(ref($class) !~ /^$/);
my $self = {
NAMESPACE => $class,
PACKAGE => __PACKAGE__,
};
bless($self, $class);
my $objectManager = Anansi::ObjectManager->new();
$objectManager->register($self);
$self->initialise(%parameters);
return $self;
}
=head2 old
$object->old();
lib/Anansi/Class.pm view on Meta::CPAN
$object->used('EXAMPLE');
=over 4
=item self I<(Blessed Hash, Required)>
An object of this namespace.
=item parameters I<(Array, Optional)>
An array of strings containing the names of blessed objects currently in use by
this object.
=back
Releases a module instance object to enable it to be destroyed.
=cut
sub used {
lib/Anansi/Class.pm view on Meta::CPAN
));
=over 4
=item self I<(Blessed Hash, Required)>
An object of this namespace.
=item parameters I<(Array B<or> String, Optional)>
A string or an array of strings containing the names of blessed objects
currently in use by this object.
=back
Either returns an array of strings containing the names of the blessed objects
currently in use by this object or the blessed object represented by the single
specified name or whether the specified names represent blessed objects with a
B<1> I<(one)> for yes and B<0> I<(zero)> for no.
=cut
sub using {
my ($self, @parameters) = @_;
if(0 == scalar(@parameters)) {
} elsif(1 == scalar(@parameters)) {
return if(ref($parameters[0]) !~ /^$/);
( run in 1.195 second using v1.01-cache-2.11-cpan-b32c08c6d1a )