Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re: use deprecated;

by Anonymous Monk
on Jan 17, 2004 at 12:08 UTC ( [id://322027] : note . print w/replies, xml ) Need Help??


in reply to use deprecated;

Don't use string eval, especially when you don't need to. Try something like
sub _deprecated { my $sh = shift; require Carp; Carp::carp("$sh() is deprecated; ". "see the documentation for an alternative;"); ... } sub import { ... for (@_){ *{"$pkg\::$_"} = sub { _deprecated($_) }; }