- or download this
use Sub::Util qw/set_prototype/;
(*Hello, *Hi) = map { set_prototype '\@\@' => $_ } map { my $var = $_;
+ sub { $_; } } qw/Hello Hi/;
- or download this
use attributes();
sub Hi { "Hi" };
attributes::->import(__PACKAGE__, *{$_}{CODE}, 'prototype(\@\@)') for
+*Hi;
- or download this
use v5.14;
use attributes();
use Data::Dumper;
...
__END__
Hi: monks
Hello: