Changeset 25598 for lang/perl/Shika

Show
Ignore:
Timestamp:
12/01/08 18:00:31 (6 years ago)
Author:
tokuhirom
Message:

use constants

Files:
1 modified

Legend:

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

    r25596 r25598  
    2020    $dst = ref $dst if ref $dst; 
    2121 
    22     print "[debug] copy functions $src to $dst\n" if $ENV{SHIKA_DEBUG}; 
     22    print "[debug] copy functions $src to $dst\n" if Shika::DEBUG_MODE; 
    2323    no strict 'refs'; 
    2424    for my $method (@{ Shika::Util::get_functions($src) }) { 
    2525        next if $method eq 'has' || $method eq 'requires' || $method eq 'meta' || $method eq 'with'; 
    2626        my $dstmethod = $alias->{$method} ? $alias->{$method} : $method; 
    27         print "[debug]   copying method $method\n" if $ENV{SHIKA_DEBUG}; 
     27        print "[debug]   copying method $method\n" if Shika::DEBUG_MODE; 
    2828        if ($dst->can($dstmethod)) { 
    29             print "[debug]   $dst already have $dstmethod. skip\n" if $ENV{SHIKA_DEBUG}; 
     29            print "[debug]   $dst already have $dstmethod. skip\n" if Shika::DEBUG_MODE; 
    3030            next; 
    3131        } 
     
    3737    my $klass = shift; 
    3838    eval "require $klass"; ## no critic ### too bad 
    39     print "[debug] cannot load class $@" if $ENV{SHIKA_DEBUG} && $@; 
     39    print "[debug] cannot load class $@" if Shika::DEBUG_MODE && $@; 
    4040} 
    4141