develooper Front page | perl.perl5.porters | Postings from May 2004

Re: constant.pm patch - resubmission

Thread Previous
From:
Gisle Aas
Date:
May 8, 2004 13:08
Subject:
Re: constant.pm patch - resubmission
Message ID:
lrisf7cde5.fsf@caliper.activestate.com
Lukas Mai <lmai@mytum.de> writes:

> +# Load Carp::croak on demand.
> +sub _croak {
> +    require Carp;
> +    no warnings 'redefine';
> +    *_croak = \&Carp::croak;
> +    goto &Carp::croak;
> +}
> +

This is IMHO not worth it since Carp by itself tries to load its guts
only on demand.  It is also unlikely that any significant program will
manage not avoid loading Carp.pm anyway.  Just 'use Carp qw(croak)'
and be done with it.

Regards,
Gisle

Thread Previous


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About