I figure it out now. Really learn a lot by reading the codes. Thanks.<div><br><div class="gmail_quote">On Sun, Mar 17, 2013 at 11:13 AM, Hao Wu <span dir="ltr"><<a href="mailto:echowuhao@gmail.com" target="_blank">echowuhao@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div>Hi Dancers,</div><div><br></div><div>I am reading the dancer2 code and can not figure out what the CODE means here.</div>
<div>Could anyone give me some direction? Thanks.</div><div><br></div><div>Dancer2/Core/Role/DSL.pm</div>
<div><br></div><div>44 sub export_symbols_to {</div><div> 45 my ($self, $caller, $args) = @_;</div><div> 46 my $exports = $self->_construct_export_map($args);</div><div> 47 </div><div> 48 foreach my $export (keys %{$exports}) {</div>
<div> 49 no strict 'refs';</div><div> 50 my $existing = *{"${caller}::${export}"}{CODE};</div><div> 51 </div><div> 52 next if defined $existing;</div><div> 53 </div><div> 54 *{"${caller}::${export}"} = $exports->{$export};</div>
<div> 55 }</div><div> 56 </div><div> 57 return keys %{$exports};</div><div> 58 }</div><div><br></div>
</blockquote></div><br></div>