in reply to Re: using local $] = 5.008004;
in thread using local $] = 5.008004;

"Well, they don't try to redefine perl version. They detect a version nobody supports anymore, and disable a feature -- no faking perl version"

I don't think kamal is claiming that the code posted does redefine the Perl version. I think he means that if you load DBIx::Class::Carp like this:

BEGIN { local $] = 5.008004; require DBIx::Class::Carp; DBIx::Class::Carp->import; };

... you can trick DBIx::Class::Carp into thinking it's running on an older Perl version.

And no, I wouldn't recommend doing that, because it'll be fragile. DBIx::Class::Carp is loaded in multiple places, it's only the version from the first time it's loaded that takes effect.

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