[dancer-users] CODE in export_symbols_to

Hao Wu echowuhao at gmail.com
Sun Mar 17 16:13:47 GMT 2013


Hi Dancers,

I am reading the dancer2 code and can not figure out what the CODE means
here.
Could anyone give me some direction? Thanks.

Dancer2/Core/Role/DSL.pm

44 sub export_symbols_to {
 45     my ($self, $caller, $args) = @_;
 46     my $exports = $self->_construct_export_map($args);
 47
 48     foreach my $export (keys %{$exports}) {
 49         no strict 'refs';
 50         my $existing = *{"${caller}::${export}"}{CODE};
 51
 52         next if defined $existing;
 53
 54         *{"${caller}::${export}"} = $exports->{$export};
 55     }
 56
 57     return keys %{$exports};
 58 }
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.preshweb.co.uk/pipermail/dancer-users/attachments/20130317/81e5272b/attachment.htm>


More information about the dancer-users mailing list