Re: "Did not find leading dereferencer" - new findings to an old puzzle




Ben Morrow schrieb:

Quoth "Ronny" <ro.naldfi.scher@xxxxxxxxx>:
Ferry Bolhar schrieb:
"Did not find leading dereferencer":
"extract_variable" was expecting one of '$', '@', or '%' at the
start of a variable, but didn't find any of them.
This doesn't make any sense. First, I don't include in my programs any
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

.



Relevant Pages

  • Re: problems with Perl RegEx match
    ... Missing right bracket at ./LogPreProcessor_Inetprod.pl line 64, ... Perl didn't encounter it. ... when I used the following search term in google to look ... considering it's an error message from an older Perl - in newer Perls, ...
    (comp.lang.perl.misc)
  • Re: About the error message in Perl : "Missing right curly braces"
    ... Subject: About the error message in Perl: "Missing right curly ... SKY and the SKY marks are trade marks of ... track which line contains that curly brace which is causing that problem, ...
    (perl.beginners)
  • Re: "Did not find leading dereferencer" - new findings to an old puzzle
    ... to do with the "Dereferencer" error, because on the first example I ... I got that error message in the context of Perl standard ... this would not explain why the error message ... source code. ...
    (comp.lang.perl.misc)
  • Re: perl and CGI
    ... This error message is _not_ a Perl error message. ... I was just trying to figure out how perl and the web server works.. ... I have already developed a perl file to manage a web form (send the ... pointers to more information. ...
    (comp.lang.perl.misc)
  • RE: lc
    ... > and I got an error message that said I couldn't use lc ... Then I checked my copy of Learning Perl and the index ... that Perl didn't have a lowercase function. ... Mail SpamGuard - Read only the mail you want. ...
    (perl.beginners)