Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re^5: RFC: Inline::Blocks or inline as a keyword?

by tobyink (Canon)
on Jul 31, 2018 at 07:49 UTC ( #1219537=note: print w/replies, xml ) Need Help??


in reply to Re^4: RFC: Inline::Blocks or inline as a keyword?
in thread RFC: Inline::Blocks or inline as a keyword?

Keyword::Declare isn't a source filter in the usual sense. Rather than pre-process the source before Perl parses it, it installs hooks into the Perl parser so that your custom parsing routines can be called when Perl encounters a new keyword you've defined. In general, this is definitely a better approach than source filtering.

That said, I don't think it would work for your particular case because you want the ability to parse a normal-looking sub call specially (inline it) depending on how the sub had been declared (with the inline prefix) elsewhere in the file. In that case there's no keyword to hook into.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (5)
As of 2020-02-19 00:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What numbers are you going to focus on primarily in 2020?










    Results (80 votes). Check out past polls.

    Notices?