diff options
author | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-11-26 13:02:09 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@gmail.com> | 2007-11-26 13:02:09 +0000 |
commit | bad2d960389954fbd8fc49bf72b3bc05b56dfe94 (patch) | |
tree | 7cb30c3268251f6820d767bc9eb3dc405f5feee8 /lib/Attribute | |
parent | fcbc2cdbfb87f2f022dd44fc82e01764faffaa19 (diff) | |
download | perl-bad2d960389954fbd8fc49bf72b3bc05b56dfe94.tar.gz |
Adjust for the RAWDATA case
p4raw-id: //depot/perl@32497
Diffstat (limited to 'lib/Attribute')
-rw-r--r-- | lib/Attribute/Handlers.pm | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/Attribute/Handlers.pm b/lib/Attribute/Handlers.pm index 27b60af9c3..6c0efc58ed 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 = $@) { |