Show
Ignore:
Timestamp:
11/27/08 13:51:47 (6 years ago)
Author:
mattn
Message:

shouldn't store scalar?

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Shika/trunk/lib/Shika.pm

    r25077 r25078  
    2828        while (my ($name, $code) = each %{$default->{$klass}}) { 
    2929            unless (exists $attr{$name}) { 
    30                 $attr{$name} = $code->(); 
     30                $attr{$name} = ref($code) eq 'CODE' ? $code->() : $code; 
    3131            } 
    3232        }