[PBP-pm] what's the correct way to do eval

Randal L. Schwartz merlyn at stonehenge.com
Tue Dec 25 21:03:29 PST 2007


>>>>> "Chris" == Chris Dolan <chris at chrisdolan.net> writes:

Chris> Huh?  Isn't the following equivalent?

Chris>   my $has_proc_pid_file = eval "require Proc::PID::File;
Chris> Proc::PID::File->import; 1;";

It's the eval $string that P::C is complaining about.  And there's
not a good way around that.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!


More information about the PBP-pm mailing list