Lines Matching defs:SelfLoader

1 package SelfLoader;
10 my %Cache; # private cache for all SelfLoader's client packages
23 print STDERR "SelfLoader::AUTOLOAD for $AUTOLOAD\n" if $DEBUG;
30 SelfLoader->_load_stubs($1) unless exists $Cache{"${1}::<DATA"};
36 print STDERR "SelfLoader::AUTOLOAD eval: $SL_code\n" if $DEBUG;
44 defined(&$AUTOLOAD) || die "SelfLoader inconsistency error";
58 print STDERR "SelfLoader::load_stubs($callpack)\n" if $DEBUG;
75 \&{"${1}::AUTOLOAD"} == \&SelfLoader::AUTOLOAD ||
76 die 'SelfLoader Error: attempt to specify Selfloading',
90 \&{"${1}::AUTOLOAD"} == \&SelfLoader::AUTOLOAD ||
91 die 'SelfLoader Error: attempt to specify Selfloading',
121 print STDERR "SelfLoader cached $fullname: $Cache{$fullname}" if $DEBUG;
133 SelfLoader - load functions only on demand
138 use SelfLoader;
174 =head2 SelfLoader autoloading
176 The B<SelfLoader> works by the user placing the C<__DATA__>
182 The B<SelfLoader> will read from the FOOBAR::DATA filehandle to
190 The B<SelfLoader> will stop reading from C<__DATA__> if
193 token DATA, then the B<SelfLoader> leaves the FOOBAR::DATA
196 The B<SelfLoader> exports the C<AUTOLOAD> subroutine to the
197 package using the B<SelfLoader>, and this loads the called
212 lexicals (this applies to both the B<SelfLoader> and the Autoloader).
217 =head2 SelfLoader and AutoLoader
219 The B<SelfLoader> can replace the AutoLoader - just change 'use AutoLoader'
220 to 'use SelfLoader' (though note that the B<SelfLoader> exports
226 There is no need to inherit from the B<SelfLoader>.
228 The B<SelfLoader> works similarly to the AutoLoader, but picks up the
240 the C<FOOBAR::DATA> together with the B<SelfLoader>.
245 by the B<SelfLoader>. The C<FOOBAR::DATA> filehandle is left open if an
251 The B<SelfLoader> reads from wherever the current
259 of subroutine declarations. You must also ensure that the B<SelfLoader>
260 reads first by calling 'SelfLoader-E<gt>load_stubs();', or by using a
288 adding the statement 'SelfLoader-E<gt>load_stubs();' to the module to do
301 should note that this requires exporting the C<SelfLoader::AUTOLOAD> to
303 B<SelfLoader> when it first loads the subs into the cache, but you should
305 a 'use SelfLoader' statement in each package.
314 will all be loaded correctly by the B<SelfLoader>, and the B<SelfLoader>
316 B<SelfLoader> C<AUTOLOAD> method when the data after C<__DATA__> is first