[RFC]Class::Lazy - Yet another lazy object construction module
am 30.07.2007 10:42:10 von RintaroHi all,
I would like comment from the community about a module I created,
named Class::Lazy.
(Sorry about my bad English but, I'm not a native speaker.)
I put it on:
http://www.fs-output.com/trac/raw-attachment/wiki/ClassLazy/ Class-Lazy-0.01_01.tar.gz
Trac development home:
http://www.fs-output.com/trac/wiki/ClassLazy
= NAME =
Class::Lazy
= SYNOPSIS =
use Class::Lazy;
my $thing = Some::Heavy::Class->lazy::new();
# ... any code ... ( construction is postponed ...)
my $res = $thing->some_method(); # constructed now!
= DESCRIPTION =
Class::Lazy is module for lazy object construction.
Only you have to do is prefix "lazy::" to the constructor:
$thing = SomeClass->new();
$lazything = SomeClass->lazy::new();
By doing this, construction is delayed until you call any method on
that.
---
Here are my questions:
* Using "lazy::" namespace is acceptable?
* Please help better documentation X-(
Thanks.
---
Rintaro
http://www.fs-output.com