Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Filter::Simple bug with here documents

by GrandFather (Sage)
on Dec 02, 2005 at 05:01 UTC ( #513514=note: print w/ replies, xml ) Need Help??


in reply to Filter::Simple bug with here documents

Curiosity only but, what lead you to try [$_]; there?


DWIM is Perl's answer to Gödel


Comment on Re: Filter::Simple bug with here documents
Download Code
Replies are listed 'Best First'.
Re^2: Filter::Simple bug with here documents
by Ovid (Cardinal) on Dec 02, 2005 at 05:09 UTC

    What? You don't just randomly insert [$_] throughout your code to see what happens? :)

    After much debugger work (and using the debugger with source filters is not fun), I found the error appeared to be coming from &Text::Balanced::extract_multiple. Since I couldn't get it to generate the error directly, I fell back to using an empty source filter and that kicked up the error. &Filter::Simple::gen_std_filter_for is the only place in Filter::Simple where extract multiple is called:

    sub gen_std_filter_for { my ($type, $transform) = @_; return sub { my $instr; local @components; for (extract_multiple($_,$extractor_for{$type})) {

    So naturally, right before that line I added this:

    use Data::Dumper; warn Dumper( [ $_, $extractor_for{$type} ] );

    At that point, the error went away, I sneezed and my head imploded (how Britney Spear's head fails to implode when she sneezes is another mystery I haven't solved). More playing around got that down to the "fix" which I posted.

    Cheers,
    Ovid

    New address of my CGI Course.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others making s'mores by the fire in the courtyard of the Monastery: (18)
As of 2015-07-28 19:29 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (258 votes), past polls