From: Rafael Garcia-Suarez Date: Mon, 26 Nov 2007 13:02:09 +0000 (+0000) Subject: Adjust for the RAWDATA case X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=bad2d960389954fbd8fc49bf72b3bc05b56dfe94;p=p5sagit%2Fp5-mst-13.2.git Adjust for the RAWDATA case p4raw-id: //depot/perl@32497 --- diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index 27b60af..6c0efc5 100644 --- a/lib/Attribute/Handlers.pm +++ b/lib/Attribute/Handlers.pm @@ -190,7 +190,10 @@ sub _apply_handler_AH_ { my $sym = findsym($pkg, $ref); $sym ||= $type eq 'CODE' ? 'ANON' : 'LEXICAL'; no warnings; - if (!$raw) { + if ($raw) { + $data = [$data]; + } + else { $data = !$raw && eval("package $pkg; no warnings; no strict; local \$SIG{__WARN__}=sub{die}; [$data]"); if (my $error = $@) {