summaryrefslogtreecommitdiff
path: root/lib/Attribute
diff options
context:
space:
mode:
authorRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-11-26 13:02:09 +0000
committerRafael Garcia-Suarez <rgarciasuarez@gmail.com>2007-11-26 13:02:09 +0000
commitbad2d960389954fbd8fc49bf72b3bc05b56dfe94 (patch)
tree7cb30c3268251f6820d767bc9eb3dc405f5feee8 /lib/Attribute
parentfcbc2cdbfb87f2f022dd44fc82e01764faffaa19 (diff)
downloadperl-bad2d960389954fbd8fc49bf72b3bc05b56dfe94.tar.gz
Adjust for the RAWDATA case
p4raw-id: //depot/perl@32497
Diffstat (limited to 'lib/Attribute')
-rw-r--r--lib/Attribute/Handlers.pm5
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 = $@) {