Skip to content

Instantly share code, notes, and snippets.

@tadzik
Created January 9, 2012 23:46
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/1585730 to your computer and use it in GitHub Desktop.
Save tadzik/1585730 to your computer and use it in GitHub Desktop.
Bug or feature?
┌─[tadzik@yavin4]─[~/src/perl/bailador] (master)*
└─[%]─> cat lib/Bailador.pm
module Bailador;
our sub our_template {
return "(our template)"
}
sub exp_template is export {
return "(exp template)"
}
sub hook is export {
&our_template.wrap: { "wrapped {callsame()}" };
&exp_template.wrap: { "wrapped {callsame()}" };
}
┌─[tadzik@yavin4]─[~/src/perl/bailador] (master)*
└─[%]─> cat examples/app.pl
use Bailador;
sub foo {
say Bailador::our_template();
say exp_template();
}
hook();
foo();
┌─[tadzik@yavin4]─[~/src/perl/bailador] (master)*
└─[%]─> perl6 examples/app.pl
wrapped (our template)
(exp template)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment