Changeset 25045 for lang/perl/Shika

Show
Ignore:
Timestamp:
11/27/08 11:45:32 (6 years ago)
Author:
tokuhirom
Message:

てきとうに new とか

Files:
1 modified

Legend:

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

    r25041 r25045  
    66 
    77sub import { 
     8    my $pkg = caller(0); 
    89    strict->import; 
    910    warnings->import; 
     11 
     12    no strict 'refs'; 
     13    *{"$pkg\::new"} = \&_new; 
     14    *{"$pkg\::has"} = \&_has; 
     15} 
     16 
     17sub _new { 
     18    my $class = shift; 
     19    bless { @_ }, $class 
     20} 
     21 
     22sub _has { 
     23    my $pkg = caller(0); 
    1024} 
    1125