in reply to Re^5: parser bug handling 'do ($foo)->{bar}' ?
in thread parser bug handling 'do ($foo)->{bar}' ?

I googled for "looks like a function" site:perldoc.perl.org and found (surprisingly ;-) perlfunc

In perlfunc#Perl-Functions-by-Category do is only listed under "Keywords related to Perl modules", which might explain the API.¹

Also looked into perlglossary which mentions looks-like-a-function only once under the title pseudofunction .

Surprisingly there is not one other perldoc mentioning pseudofunctions !?!

But actually this helps fixing the bug in B::Deparse, cause the handling of other pseudofunctions could be mimicked for do FILE .

Cheers Rolf

(addicted to the Perl Programming Language and ☆☆☆☆ :)

¹) NB: eval is listed under "Keywords related to the control flow" ;-)

  • Comment on Re^6: parser bug handling 'do ($foo)->{bar}' ?

Replies are listed 'Best First'.
Re^7: parser bug handling 'do ($foo)->{bar}' ? (more B::Deparse bugs)
by LanX (Saint) on Oct 14, 2014 at 17:07 UTC
    > But actually this helps fixing the bug in B::Deparse, cause the handling of other pseudofunctions could be mimicked for do FILE .

    or we're going to identify a whole new problem group ;´D

    $ perl -MO=Deparse -e '(-s "foo")+100' -s('foo') + 100; -e syntax OK $ perl -w -MO=Concise -e '(-s "foo")+100' Useless use of addition (+) in void context at -e line 1. 7 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 6 <2> add[t2] vK/2 ->7 4 <1> ftsize[t1] sKP/1 ->5 3 <$> const[PV "foo"] s ->4 5 <$> const[IV 100] s ->6 -e syntax OK $ perl -w -MO=Concise -e '-s ("foo")+100' 7 <@> leave[1 ref] vKP/REFC ->(end) 1 <0> enter ->2 2 <;> nextstate(main 1 -e:1) v:{ ->3 6 <1> ftsize[t2] vK/1 ->7 5 <2> add[t1] sK/2 ->6 3 <$> const[PVNV "foo"] sP ->4 4 <$> const[IV 100] s ->5 -e syntax OK

    Cheers Rolf

    (addicted to the Perl Programming Language and ☆☆☆☆ :)

Re^7: parser bug handling 'do ($foo)->{bar}' ?
by ysth (Canon) on Oct 14, 2014 at 17:20 UTC
    perlglossary was imported from the Camel III (with permission) so sometimes has terminology differences from the rest of the perldoc.
    A math joke: r = | |csc(θ)|+|sec(θ)| |-| |csc(θ)|-|sec(θ)| |