Subject: | [PATCH] Fix for 5.21.4 |
The attached patch makes the module work in perl 5.21.4. Stashes can now contain code references.
Sorry for not sending this via github. Their site always seems so buggy as to be unusable. (Maybe some proxy problem at this end; I don’t know.)
Subject: | open_jzAttXwc.txt |
diff -rup Applify-0.08-4hpHQ_-orig/lib/Applify.pm Applify-0.08-4hpHQ_/lib/Applify.pm
--- Applify-0.08-4hpHQ_-orig/lib/Applify.pm 2014-09-28 00:22:26.000000000 -0700
+++ Applify-0.08-4hpHQ_/lib/Applify.pm 2014-09-28 00:22:50.000000000 -0700
@@ -377,7 +377,11 @@ sub _generate_application_class {
for my $name (keys %$ns) {
$self->{skip_subs}{$name} and next;
- my $code = eval { *{$ns->{$name}}{CODE} } or next;
+ my $code = eval {
+ ref $ns->{$name} eq 'CODE'
+ ? $ns->{$name}
+ : *{$ns->{$name}}{CODE}
+ } or next;
my $fqn = join '::', $application_class, $name;
__new_sub $fqn => $code;
delete $ns->{$name}; # may be a bit too destructive?