Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created April 21, 2012 21:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tadzik/2439577 to your computer and use it in GitHub Desktop.
Save tadzik/2439577 to your computer and use it in GitHub Desktop.
335 # act as --help too if we have MAIN defined
336 say($*W.symbol_lookup(['$?USAGE'], $/));
337 if $*UNIT.symbol('&MAIN') {
338 $block.push(
339 PAST::Op.new(
340 :pasttype<call>, :node($/),
341 :name('&say'),
342 $*W.symbol_lookup(['$?USAGE'], $/)
343 )
344 )
345 }
Prints:
Capture[0x2bd3840]
Could not find symbol '$?USAGE'
in block <anon> at test2.pl:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment