Lines Matching full:base
2 package base; package
9 sub base::__inc::unhook { @INC = grep !(ref eq 'CODE' && $_ == $_[0]), @INC } subroutine
11 sub base::__inc::scope_guard::DESTROY { base::__inc::unhook $_ for @{$_[0]} } subroutine
25 my($base) = shift;
26 my $fglob = ${"$base\::"}{FIELDS};
85 # List of base classes from which we will inherit %FIELDS.
91 foreach my $base (@_) {
92 if ( $inheritor eq $base ) {
96 next if grep $_->isa($base), ($inheritor, @bases);
103 my $fn = _module_to_filename($base);
107 if ($INC[-1] eq '.' && %{"$base\::"}) {
129 # a module loaded via base.pm uses base.pm itself, there will be
130 # one pair of hooks in @INC per base::import call frame, but the
134 …splice @INC, -1, 0, sub { return if defined caller $lvl; ++$dot_hidden, &base::__inc::unhook; () …
135 $guard = bless [ @INC[0,-2] ], 'base::__inc::scope_guard';
142 Base class package "$base" is not empty but "$fn[0]" exists in the current directory.
143 To help avoid security issues, base.pm now refuses to load optional modules
161 unless (%{"$base\::"}) {
165 Base class package "$base" is empty.
175 push @bases, $base;
177 if ( has_fields($base) || has_attr($base) ) {
183 $fields_base = $base;
197 my($derived, $base) = @_;
199 return SUCCESS unless $base;
201 my $battr = get_attr($base);
204 my $bfields = get_fields($base);
210 $derived is inheriting from $base but already has its own fields!
211 This will cause problems. Be sure you use base BEFORE declaring fields.
216 # Iterate through the base's fields adding all the non-private
249 base - Establish an ISA relationship with base classes at compile time
254 use base qw(Foo Bar);
271 When C<base> tries to C<require> a module, it will not die if it cannot find
273 your base class be empty, containing no symbols, C<base> will die. This is
275 the filename does not match the base module name, like so:
282 use base "Foo";
285 subroutine), C<base> will not die when the C<require> fails to load F<Foo.pm>.
287 C<base> will also initialize the fields if one of the base classes has it.
288 Multiple inheritance of fields is B<NOT> supported, if two or more base classes
289 each have inheritable fields the 'base' pragma will croak. See L<fields>
292 The base class' C<import> method is B<not> called.
299 =item Base class package "%s" is empty.
301 base.pm was unable to require the base package, because it was not
309 use base 'Foo';
320 base I<before> you declare any of your own fields.