Re: "Did not find leading dereferencer" - new findings to an old puzzle
- From: "Ronny" <ro.naldfi.scher@xxxxxxxxx>
- Date: 8 Nov 2006 07:20:14 -0800
Ben Morrow schrieb:
Quoth "Ronny" <ro.naldfi.scher@xxxxxxxxx>:
Ferry Bolhar schrieb:
"Did not find leading dereferencer":This doesn't make any sense. First, I don't include in my programs any
"extract_variable" was expecting one of '$', '@', or '%' at the
start of a variable, but didn't find any of them.
Text:: stuff. Second, this would not explain why the error message
changes to the real one, if, say, I remove one comment line from the
source code.
Are you by any chance using any modules that set up source filters?
Switch.pm, perhaps? These often use Text::Balanced to do their work, and
it isn't quite as good at parsing Perl as it might be.
Indeed I do have a
use Switch 'Perl6';
in this module. Good point.
As usual, if you reduce your script to the *minimal* example which
reproduces the problem (yes, in this case this might be a lot of work),
and post it here, I'm sure someone can tell you what's going on.
The problem with errors which occur only in "sufficiently big" source
files is
that the minimal example is still fairly big. In my case, I have
reduced it
to the extent that deleting one single character (for example, the "#"
in front of an empty comment line) already makes this error go away.
Still, the source file is around 350 lines big.
On the positive side, my example file is kind of self-contained in that
it
uses only standard modules, so if the Perl developers are interested in
this bug, they can take this file and reproduce the error.
BTW, another interesting observation: My example file shows the
error only if it is "use'd" (it starts with a #! line so that,
technically,
you can also call it as a stand-alone program, but it is written as
a module, so that you can also 'use' it). This means that if you
write
# Name of the file demonstrating the error: hinig.pm
perl -e 'use hinig;'
you get the "leading dereferncer" error, but if you just call it as
hinig.pm
you get the 'real' error message.
Ronald
Ben
--
It will be seen that the Erwhonians are a meek and long-suffering people,
easily led by the nose, and quick to offer up common sense at the shrine of
logic, when a philosopher convinces them that their institutions are not based
on the strictest morality. [Samuel Butler, paraphrased] benmorrow@xxxxxxxxxxxxx
.
- Follow-Ups:
- References:
- Prev by Date: Re: Newbie perl question
- Next by Date: Re: Perl and OpenGL
- Previous by thread: Re: "Did not find leading dereferencer" - new findings to an old puzzle
- Next by thread: Re: "Did not find leading dereferencer" - new findings to an old puzzle
- Index(es):
Relevant Pages
|