Changeset 871
- Timestamp:
- 11/23/08 09:40:00 (4 years ago)
- Location:
- trunk/core/lib/Foswiki
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/core/lib/Foswiki/Engine.pm
r830 r871 405 405 =cut 406 406 407 sub write { } 407 sub write { 408 ASSERT('Pure virtual method - should never be called'); 409 } 408 410 409 411 1; -
trunk/core/lib/Foswiki/Plugin.pm
r830 r871 79 79 =pod 80 80 81 ---++ ClassMethod new( $session, $name )81 ---++ ClassMethod new( $session, $name, [, $module] ) 82 82 83 83 * =$session= - Foswiki object 84 84 * =$name= - name of the plugin e.g. MyPlugin 85 85 * =$module= - name of implementing package; optional, used for tests. 86 Normally =load= is used to discover the module from the config. 86 87 =cut 87 88 88 89 sub new { 89 my ( $class, $session, $name ) = @_;90 my ( $class, $session, $name, $module ) = @_; 90 91 my $this = bless( { session => $session }, $class ); 91 92 … … 93 94 $name = Foswiki::Sandbox::untaintUnchecked($name); 94 95 $this->{name} = $name || ''; 96 if ( defined($module) ) { 97 $this->{module} = $module; # otherwise use discovery 98 } 95 99 96 100 return $this;
Note: See TracChangeset
for help on using the changeset viewer.
