diff options
| author | Andreas Brachold <vdr07@deltab.de> | 2007-08-13 18:41:27 +0000 |
|---|---|---|
| committer | Andreas Brachold <vdr07@deltab.de> | 2007-08-13 18:41:27 +0000 |
| commit | bcbf441e09fb502cf64924ff2530fa144bdf52c5 (patch) | |
| tree | f377707a2dac078db8cd0c7d7abfe69ac1006d71 /lib/Class/MakeMethods/Template/Flyweight.pm | |
| download | xxv-bcbf441e09fb502cf64924ff2530fa144bdf52c5.tar.gz xxv-bcbf441e09fb502cf64924ff2530fa144bdf52c5.tar.bz2 | |
* Move files to trunk
Diffstat (limited to 'lib/Class/MakeMethods/Template/Flyweight.pm')
| -rw-r--r-- | lib/Class/MakeMethods/Template/Flyweight.pm | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/Class/MakeMethods/Template/Flyweight.pm b/lib/Class/MakeMethods/Template/Flyweight.pm new file mode 100644 index 0000000..33f44ed --- /dev/null +++ b/lib/Class/MakeMethods/Template/Flyweight.pm @@ -0,0 +1,43 @@ +package Class::MakeMethods::Template::Flyweight; + +use Class::MakeMethods::Template::InsideOut '-isasubclass'; + +$VERSION = 1.008; + +sub new { { '-import' => { 'Template::Scalar:new' => '*' } } } + +1; + +__END__ + +=head1 NAME + +Class::MakeMethods::Template::Flyweight - Deprecated name for InsideOut + +=head1 SYNOPSIS + + package MyObject; + use Class::MakeMethods::Template::InsideOut ( + new => [ 'new' ] + scalar => [ 'foo', 'bar' ] + ); + + package main; + + my $obj = MyObject->new( foo => "Foozle", bar => "Bozzle" ); + print $obj->foo(); # Prints Foozle + $obj->bar("Bamboozle"); # Sets $obj->{bar} + +=head1 DESCRIPTION + +Earlier versions of this package included a package named Class::MakeMethods::Template::Flyweight. + +However, in hindsight, this name was poorly chosen, as it suggests that the Flyweight object design pattern is being used, when the functionality is more akin to what's sometimes known as "inside-out objects." + +This functionality is now provided by Class::MakeMethods::Template::InsideOut, of which this is an almost-empty subclass retained to provide backwards compatibility. + +=head1 SEE ALSO + +L<Class::MakeMethods::Template::InsideOut>. + +=cut
\ No newline at end of file |
