Show
Ignore:
Timestamp:
07/01/08 04:52:13 (17 months ago)
Author:
bchoate
Message:

Added support for a plugin/component to define an init handler.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-41/lib/MT/Component.pm

    r1927 r2667  
    137137        } 
    138138    } 
     139    if (my $init = _getset( $c, 'init' )) { 
     140        if ( $init && !ref($init) ) { 
     141            $init = MT->handler_to_coderef($init); 
     142        } 
     143        return $init->($c); 
     144    } 
     145    return 1; 
    139146} 
    140147