From: Yuval Kogman Date: Sat, 23 Aug 2008 13:46:04 +0000 (+0000) Subject: workaround 5.8.1 bug X-Git-Tag: 0.64_04~3 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=f6394c6c54c3a1a4245dca510fb23decae12bee3;p=gitmo%2FClass-MOP.git workaround 5.8.1 bug --- diff --git a/lib/Class/MOP/Class.pm b/lib/Class/MOP/Class.pm index d8f590b..939d857 100644 --- a/lib/Class/MOP/Class.pm +++ b/lib/Class/MOP/Class.pm @@ -1115,7 +1115,12 @@ sub create_immutable_transformer { my $original = shift; confess "Cannot add package symbols to an immutable metaclass" unless (caller(2))[3] eq 'Class::MOP::Package::get_package_symbol'; - goto $original->body; + + # This is a workaround for a bug in 5.8.1 which thinks that + # goto $original->body + # is trying to go to a label + my $body = $original->body; + goto $body; }, }, });