Geoffrey Young wrote:

Cool.

Though I'm not sure about the CODEREF part. bugreport is a just a function to run if 'make test' fails. Though you hardcoded it to be a function to print something. Since eval of that CODEREF happens during generate_script() you could just do it and pass that return value to bugreport. i.e. it provides no added value.


well, I was thinking that this might be useful and a bit more dwimmy.

generate_script(bugreport => \&My::Foo::bugreport);

of course you could, as you say, evaluate the sub then pass in the resulting string, but I kinda thought the delayed eval made it a bit neater - that's the added value :)

Delayed eval? I fail to see where the delay is coming from? You run eval {} in generate_script, so why not just run it in Makefile.PL and pass the result? I think with the proposed patch these 2 things do exactly the same thing at exactly (well almost) the same time:


generate_script(bugreport => \&My::Foo::bugreport);
generate_script(bugreport => My::Foo::bugreport());

If I miss something please explain.

but whatever, it doesn't matter to me.




__________________________________________________________________
Stas Bekman            JAm_pH ------> Just Another mod_perl Hacker
http://stason.org/     mod_perl Guide ---> http://perl.apache.org
mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
http://modperlbook.org http://apache.org   http://ticketmaster.com


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to