in reply to Re^2: Require a Modul that produced a error before
in thread Require a Modul that produced a error before

Sorry for the delayed reply.

In the examples below, I used the following test harness:

my $module = do { open(my $fh, '<', 'Module.pm') or die("Unable to read Module.pm: $!\n"); local $/; <$fh> }; eval $module or warn $@; $module =~ s/^for;$/#for;/m; eval $module or warn $@;

That's all I can think of. It's not quite as bad as I thought, since I thought a function could capture a variable from the first attempt, and another function could capture the same variable from the second attempt. Still, the above can still create some weird problems.

Replies are listed 'Best First'.
Re^4: Require a Modul that produced a error before
by Outaspace (Scribe) on Oct 16, 2006 at 21:57 UTC
    Thanks, since I only would use it to speed up the development process, I can use this approach. Also the Modules that are required are all OO and I try to keep those things out of it. The rest should be done by the Perl Carbage Collection.

    Andre