# New Ticket Created by  "Carl Mäsak" 
# Please include the string:  [perl #107844]
# in the subject line of all future correspondence about this issue. 
# <URL: https://rt.perl.org:443/rt3/Ticket/Display.html?id=107844 >


<tadzik> about wrap again: https://gist.github.com/1585730

Included here for completeness:

┌─[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)

<masak> tadzik: looks like a bug to me.
<tadzik> S11 uses the word "binding" when it comes to exportation,
this looks more like copying
<masak> tadzik: haven't read what S11 says about it, but binding makes
a lot of sense and copying doesn't.

S11:137:

Importing via C<use> binds into the current lexical scope by default

<masak> tadzik: will you submit a rakudobug, or shall I?
<tadzik> masak: go on
* masak submits rakudobug

Reply via email to