Beefy Boxes and Bandwidth Generously Provided by pair Networks Bob
Think about Loose Coupling
 
PerlMonks  

Re: Perl module error

by boftx (Hermit)
on Oct 04, 2013 at 23:36 UTC ( #1056951=note: print w/ replies, xml ) Need Help??


in reply to Perl module error

Sometimes you can get a meaningful error message from perltidy that will tell you what line has a missing brace/bracket/paren. I would try that and see if it sheds any light. Using that, and perl -c as you did, should point out any problem areas. (But it is hard to imagine that if it passes perl -c that there is anything wrong in the file itself.)

On time, cheap, compliant with final specs. Pick two.


Comment on Re: Perl module error
Select or Download Code
Re^2: Perl module error
by Vaclav_ (Novice) on Oct 05, 2013 at 01:35 UTC
    Finally. After running perltidy on the module, it's syntax Ok. Perltidy add/removes whitespaces only, right? What could I have messed up with them, I thought whitespaces doesn't really matter. This is not python :D

      I thought whitespaces doesn't really matter. This is not python :D

      No, whitespace doesn't mostly matter, but maybe you invoked the MACRO precompiler features ( perlrun ) or loaded a source filter via PERL5OPT or something like that, something that inserted an extra stray curly brace or square bracket

      Did you save a copy of the broken one? Did you  use Data::Dumper; use Path::Tiny; dd( path( $file )->slurp_raw ) ;

        Yes I had use Data::Dumper; before "use - this broken module". Why would that be a problem?

      I suggested perltidy because it will sometimes complain about missing braces, etc, and give you the line number that was unmatched in a way different than perl -c will in the log file. You are indeed most correct that white space doesn't matter. But that doesn't mean that a silly typo doesn't creep in now and again. :)

      On time, cheap, compliant with final specs. Pick two.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1056951]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (9)
As of 2014-04-16 07:45 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    April first is:







    Results (418 votes), past polls