Hi all,

I am running VMS perl 5.8.6. I am using persistent perl and am eval'ing a file.

The problem is, sometimes I want to eval the file to debug it. To make matters 
worse, I need to use ptkdb to do the debugging.

I've tried the obvious things like putting perl -d:ptkdb into the first line of 
the file, and putting "use Devel::ptkdb" into PERL5LIB and PERLDBOPT all to no 
avail.

Is this even possible?

Thanks in advance,

-Doug 

Code snippet follows:


  ...{
        local *FH;
        open FH, $filename or die "open '$filename' $!";
        local($/) = undef;
        my $sub = <FH>;
        close FH;

        #wrap the code into a subroutine inside our unique package
        my $eval = qq{package $package; sub handler { $sub; }};
        {
            # hide our variables within this block
            my($filename,$mtime,$package,$sub);
            eval $eval;
        }
        die $@ if $@;
 
        #cache it unless we're cleaning out each time
        $Cache{$package}{mtime} = $mtime unless $delete;
     }

     eval {$package->handler;};
     die $@ if $@;


 __________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

Reply via email to