Changeset 11998 for lang/perl/dan

Show
Ignore:
Timestamp:
05/19/08 23:03:25 (7 years ago)
Author:
yappo
Message:

Dan the 'support'

Location:
lang/perl/dan/trunk
Files:
1 added
1 modified

Legend:

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

    r3315 r11998  
    2222my $DEFAULT_UTF8HINTBITS; 
    2323my $utf8_hint_bits = 0x00800000; 
     24my $is_DanThe; 
    2425 
    2526sub import { 
    2627    my($class, %opts) = @_; 
     28 
     29    if (exists $opts{the} && !$is_DanThe) { 
     30        eval "package the; sub Dan { shift; return wantarray ? \@_ : \$_[0] } 1;"; 
     31        $is_DanThe++; 
     32        return; 
     33    } 
    2734 
    2835    if (ref($opts{cat_decode} || '') eq 'CODE' && ! exists $opts{decode}) {