Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re: Perl 5.17 change to use re 'eval' breaks Acme::EyeDrops

by tobyink (Abbot)
on Apr 25, 2013 at 06:44 UTC ( #1030601=note: print w/replies, xml ) Need Help??


in reply to Perl 5.17 change to use re 'eval' breaks Acme::EyeDrops

Maybe the resulting script should have the following header:

# If you want your scripts to look like this, you should use Acme::EyeDrops 2.00;

Acme::EyeDrops would then add a VERSION method (which will be automatically called by Perl at compile time) which could do something along the lines of:

sub VERSION { my $proto = shift; if (@_ and $_[0] >= 2.00 and $] >= 5.017) { require re; re->import("eval"); } $proto->SUPER::VERSION(@_); }

That is, if you need to add some code, then make it look like a badly line-wrapped comment.

package Cow { use Moo; has name => (is => 'lazy', default => sub { 'Mooington' }) } say Cow->new->name

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1030601]
help
Chatterbox?
[Lady_Aleena]: atcroft. maybe look at raw PODs. There is also L<foo|http://foo. com> and some might be linking directly to meta::cpan.
[Lady_Aleena]: Oops, didn't read the L<text|url> right.
[atcroft]: Lady_Aleena: I considered it a violation of the principle of least surprise, but before I tried sending a message to the particular author (and perhaps make myself appear more foolish than normal), I wanted to find out if there was a more site-agnostic
[atcroft]: way (since I am guessing that MetaCPAN may be the author's preferred CPAN interface).

How do I use this? | Other CB clients
Other Users?
Others studying the Monastery: (4)
As of 2017-05-27 03:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?