Datareign

These are issues that we have come across for which we can find no obvious solutions. We record them here in the hope that, if nothing else, others experiencing the same behaviour will, at least, be re-assured that they are not suffering alone. :-)

This is not to say that these anomalies represent bugs in Perl, they may simply be straightforward failings on our part. If you can spot a solution, we'll be very grateful for your input!

Array Passes Out of Scope in Eval String

Found in ActivePerl 5.10.0 build 1004.

We created a single dimension array with global scope and then referenced it inside a string loaded at run-time, which is passed to eval. The contents of the array are not visible within the evaluated block. However, an associative array, created and referenced in similar fashion, works as expected.

Eval [String] Fails Silently if Return Encountered

Found in ActivePerl 5.10.0 build 1004.

When a string is passed to eval that contains “return” commands, eval fails to process any part of the string. Even with the debugger in single step mode, the eval call fails completely.

The workaround, it will come as no surprise, is to remove the “return” commands and re-arrange the block to make them unnecessary.

Last modified: 2009/03/23 16:44