Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

Re: Combining Import and Source-Filter to implement Syntactic Macro mechanism

by BrowserUk (Patriarch)
on Feb 19, 2019 at 23:38 UTC ( [id://1230203]=note: print w/replies, xml ) Need Help??


in reply to Combining Import and Source-Filter to implement Syntactic Macro mechanism

I'm not set up to test the idea; but would wrapping a bare block or BEGIN block around the use force perl to see the rest of the insert?


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
  • Comment on Re: Combining Import and Source-Filter to implement Syntactic Macro mechanism

Replies are listed 'Best First'.
Re^2: Combining Import and Source-Filter to implement Syntactic Macro mechanism
by bliako (Monsignor) on Feb 20, 2019 at 00:23 UTC
    If you mean that, then no:
    {use Filter::Inject $x,$y;} print "after same line (x=$x, y=$y)\n"; print "new line: x=$x, $y\n";
    BEGIN {use Filter::Inject $x,$y;} print "after same line (x=$x, y=$y)\ +n"; print "new line: x=$x, $y\n";

    or even that:

    BEGIN {use Filter::Inject $x,$y;};;; print "after same line (x=$x, y=$ +y)\n"; print "new line: x=$x, $y\n";
Re^2: Combining Import and Source-Filter to implement Syntactic Macro mechanism
by LanX (Saint) on Feb 19, 2019 at 23:57 UTC
    Not sure what you mean.

    Example?

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery FootballPerl is like chess, only without the dice

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others wandering the Monastery: (6)
As of 2024-04-23 10:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found