Class::Prototyped::Mixin 2.4
Sponsored Links
Class::Prototyped::Mixin 2.4 Ranking & Summary
File size:
0.011 MB
Platform:
Any Platform
License:
Perl Artistic License
Price:
Downloads:
815
Date added:
2007-07-31
Publisher:
Terrence Brannon
Class::Prototyped::Mixin 2.4 description
Class::Prototyped::Mixin Perl module contains Mixin Support for Class::Prototyped.
SYNOPSIS
Usage one: whip up a class and toss it in a scalar
package HelloWorld;
sub hello {
my ($self, $age) = @_;
return "Hello World! I am $age years old"
}
package HelloWorld::Uppercase;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
uc $ret
}
);
package HelloWorld::Bold;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
"< b >$ret< /b >";
}
);
package HelloWorld::Italic;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
"< i >$ret< /i >";
}
);
# script.pl - now the whipping begins
use Class::Prototyped::Mixin qw(mixin);
my $runtime = mixin(
HelloWorld => HelloWorld::Uppercase, HelloWorld::Italic
);
print $runtime->hello(74);
< i >HELLO WORLD! I AM 74 YEARS OLD< /i >
Usage two: create hierarchy and install in a Class::Prototyped package
package CompileTime;
use Class::Prototyped::Mixin qw(mixin);
my $uclass = mixin(
HelloWorld => HelloWorld::Uppercase, HelloWorld::Bold
);
__PACKAGE__->reflect->addSlot(
* => $uclass
);
# script.pl
use CompileTime;
print CompileTime->hello(88);
< b >HELLO WORLD! I AM 88 YEARS OLD< /b >
SYNOPSIS
Usage one: whip up a class and toss it in a scalar
package HelloWorld;
sub hello {
my ($self, $age) = @_;
return "Hello World! I am $age years old"
}
package HelloWorld::Uppercase;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
uc $ret
}
);
package HelloWorld::Bold;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
"< b >$ret< /b >";
}
);
package HelloWorld::Italic;
use base qw(Class::Prototyped);
__PACKAGE__->reflect->addSlot(
[qw(hello superable)] => sub {
my $self = shift;
my $ret = $self->reflect->super(hello, @_);
"< i >$ret< /i >";
}
);
# script.pl - now the whipping begins
use Class::Prototyped::Mixin qw(mixin);
my $runtime = mixin(
HelloWorld => HelloWorld::Uppercase, HelloWorld::Italic
);
print $runtime->hello(74);
< i >HELLO WORLD! I AM 74 YEARS OLD< /i >
Usage two: create hierarchy and install in a Class::Prototyped package
package CompileTime;
use Class::Prototyped::Mixin qw(mixin);
my $uclass = mixin(
HelloWorld => HelloWorld::Uppercase, HelloWorld::Bold
);
__PACKAGE__->reflect->addSlot(
* => $uclass
);
# script.pl
use CompileTime;
print CompileTime->hello(88);
< b >HELLO WORLD! I AM 88 YEARS OLD< /b >
Class::Prototyped::Mixin 2.4 Screenshot
Advertisements
Class::Prototyped::Mixin 2.4 Keywords
HelloWorld
PACKAGE
Mixin 2.4
Mixin Support
Mixin Perl
CompileTime
Perl module
hello
QW
Mixin
ret
sub
support
Class::Prototyped::Mixin
ClassPrototypedMixin
Class::Prototyped::Mixin 2.4
Bookmark Class::Prototyped::Mixin 2.4
Class::Prototyped::Mixin 2.4 Copyright
WareSeeker periodically updates pricing and software information of Class::Prototyped::Mixin 2.4 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Class::Prototyped::Mixin 2.4 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed
Featured Software
Want to place your software product here?
Please contact us for consideration.
Contact WareSeeker.com
Related Information
mixing
helloworld.c
hellomoto
hello kitty
hello direct
dj mixing software
helloworld409
mixing colors to get other colors
mixing my turn
hello beyonce
how do you say hello in chinese
helloworld scam
perl modules
hello holidays
mixing colors
hello kitty games
intuitive music mixing device
hello world
Related Software
Class::ParmList is a Perl module with methods for processing named parameter lists. Free Download
Class::Agreement is a Perl module that add contracts to your Perl classes easily. Free Download
Class::Container is a Perl module with Glues object frameworks together transparently. Free Download
Class::HPLOO is an easier way to declare classes on Perl, based in the popular class {...} style and ePod. Free Download
classesfaq is a Perl module with frequently asked questions about the Perl classes pragma. Free Download
Class::Std is a Perl module to support for creating standard "inside-out" classes. Free Download
Class::Observable is a Perl module that allows other classes and objects to respond to events in yours. Free Download
Class::DBI::FormTools is a Perl module to build forms with multiple interconnected objects. Free Download
Latest Software
Popular Software
Favourite Software