From bad2d960389954fbd8fc49bf72b3bc05b56dfe94 Mon Sep 17 00:00:00 2001 From: Rafael Garcia-Suarez Date: Mon, 26 Nov 2007 13:02:09 +0000 Subject: [PATCH] Adjust for the RAWDATA case p4raw-id: //depot/perl@32497 --- lib/Attribute/Handlers.pm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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 = $@) { -- 2.7.4