On Mon, 15 Sep 2003 17:25, Jenda Krynicky wrote;
> Like http://search.cpan.org/search?query=Data::Lazy&mode=module
> right? :-)
Yes, exactly.
> The only thing in Defer.pm that I do not have in Data::Lazy is the
> attribute syntax. Maybe it'd be better to add that to my module
> instead of uploading a brand new module :-)
Does your module untie the original object when it is read the first
time, where it could? This avoids the tie overhead on every
subsequent access.
Do you provide any interface other than tie? For instance, I have an
`overload' interface that passes method calls and accesses onto the
lazy object, so you can do stuff like this:
my $dbh = defer { DBI->connect(@dsn) };
Changing the `defer' to `do' to have it execute immediately is one
nice feature of this syntax.
> Patches welcome, otherwise I'll have a look at Defer.pm when I get
> some free time and steal the attribute stuff from there ... that is
> if Sam doesn't mind ;-)
Not at all, please go ahead.
--
Sam Vilain, [EMAIL PROTECTED]
It is unwise to be too sure of one's own wisdom. It is healthy to be
reminded that the strongest might weaken and the wisest might err.
-- Mahatma Gandhi