Re: Another sticky module naming issue
On Mon, 15 Sep 2003 17:25, Jenda Krynicky wrote; Like http://search.cpan.org/search?query=Data::Lazymode=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
Re: Another sticky module naming issue
* Sam Vilain [EMAIL PROTECTED] [2003-08-21 01:01]: Any ideas for a better name for this module? NAME Defer - Defer execution of code until it is accessed Ok, so I'm very late to this thread (and if I don't manage to fix my DSL before I fly off to vacation you'll get this mail at least another 10 days late..) - in my defense I only caught up to the list a few days ago and then couldn't think of the term so I wrote it off since I was late anyway.. and now it just came to me out of the blue while doing other stuff. The proper jargon for execution deferred until the result is actually needed is lazy. Object::Realize::Later should have been Class::Realize::Lazy or some such, f.ex. So I would call this something like Data::Evaluate::Lazy. I'm not sure of the exact name - the toplevel namespace it should go in is a tricky question. But IMHO it definitely should be Foo::Lazy. -- Regards, Aristotle If you can't laugh at yourself, you don't take life seriously enough.
Re: Another sticky module naming issue
From: A. Pagaltzis [EMAIL PROTECTED] * Sam Vilain [EMAIL PROTECTED] [2003-08-21 01:01]: Any ideas for a better name for this module? NAME Defer - Defer execution of code until it is accessed Ok, so I'm very late to this thread (and if I don't manage to fix my DSL before I fly off to vacation you'll get this mail at least another 10 days late..) - in my defense I only caught up to the list a few days ago and then couldn't think of the term so I wrote it off since was late anyway.. and now it just came to me out of the blue while doing other stuff. You are better than me. I missed the thread completely. The proper jargon for execution deferred until the result is actually needed is lazy. Object::Realize::Later should have been Class::Realize::Lazy or some such, f.ex. So I would call this something like Data::Evaluate::Lazy. I'm not sure of the exact name - the toplevel namespace it should go in is a tricky question. But IMHO it definitely should be Foo::Lazy. Like http://search.cpan.org/search?query=Data::Lazymode=module right? :-) 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 :-) 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 ;-) Probably the second weekend from now. Jenda = [EMAIL PROTECTED] === http://Jenda.Krynicky.cz = When it comes to wine, women and song, wizards are allowed to get drunk and croon as much as they like. -- Terry Pratchett in Sourcery
Re: Another sticky module naming issue
On Saturday, August 23, 2003, at 03:23 AM, Elizabeth Mattijsen wrote: At 23:19 +0100 8/22/03, Richard Clamp wrote: 2) add META.yml to your MANIFEST This also happens automatically at some point. All of my recent distributions got a magically added META.yml and an entry added to MANIFEST. I assume make dist is doing this. Module::Build or MakeMaker indeed create the META.yml during make dist. Module::Build won't add it to your MANIFEST automatically (though it will warn if you don't do it yourself), but I believe MakeMaker will. Either of them will add it if/when you do make manifest. -Ken
Re: Another sticky module naming issue
* Johan Vromans ([EMAIL PROTECTED]) [23 Aug 2003 18:48]: [...] In other words, META.yml can be automatically produced from any existing distribution. Mostly true. Some packages have different requirements depending on build choices (most dists that use ExtUtils::AutoInstall fall into this category). These authors should note the NO_META option for EU::MM and fill out a 'recommends' section as well as a 'required' section (same syntax, and the spec doc I pointed out lists it). But, yes, 95% (probably 99%) of existing dists should be just happy. cheers, -- Iain.
Re: Another sticky module naming issue
On Thu, Aug 21, 2003 at 09:12:53AM +0200, Elizabeth Mattijsen wrote: At 21:59 +0100 8/20/03, Sam Vilain wrote: Any ideas for a better name for this module? NAME Defer - Defer execution of code until it is accessed Isn't this the same as Markov's Object::Realize::Later ? To my understanding it's a lot more like Simon Cozens's Tie::Discovery, only with single scalars rather than hash entries. -- Richard Clamp [EMAIL PROTECTED]
Re: Another sticky module naming issue
On Wed, Aug 20, 2003 at 09:59:43PM +0100, Sam Vilain wrote: Hi all, Any ideas for a better name for this module? NAME Defer - Defer execution of code until it is accessed DESCRIPTION This module implements `magic variables' that are only calculated when they are accessed. This can be extremely useful for defering things like connecting to a database, or performing computationally expensive operations. This seems on first inspection to be a form of Memoize, but providing access via variables (presumably tied, and therefore less efficient) than via functions. Memoize is part of the Perl core as of 5.8.0 . Have I missed something? Mx.