On 7 Mar 2007, at 19:04, Derek Lamb wrote:
Matt,
First, make sure you CC the pdl list in your responses, then others
can help when my limited expertise runs out. Second, I think you want
the __PACKAGE__ token. That is, unless you've really uncovered a bug
like Jarle thinks...
I think it must be, Derek. The AutoLoader functionality will execute
the test_read subroutine in the main package - that is basically the
idea of AutoLoader since you want to import the function into the
current package and in Matt's example that is main, and hence
*main::DATA ought to work (in fact if you print out caller() just
before evaluating the .pdl file in PDL::AutoLoader you find that the
current package is main. But of course if you put the function & the
__DATA__ statement in a package then it will (well, should :) work as
long as you include the <package>::DATA statement.
I must admit I am a bit puzzled about what is happening. I bet there is
some nasty stuff going on on Perl level with AutoLoading & __DATA__,
but that is more than I want to know :)
J.
_______________________________________________
Perldl mailing list
[email protected]
http://mailman.jach.hawaii.edu/mailman/listinfo/perldl