use Safe; # Use Safe when we are dealing with coderefs
BEGIN{
- $VERSION = q$0.03SVN$;
+ $VERSION = q$0.04SVN$;
($REVISION) = q$LastChangedRevision$ =~ /\$LastChangedRevision:\s+([^\s+])/;
$DEBUG = 0 unless defined $DEBUG;
$USE_SAFE = 1 unless defined $USE_SAFE;
}
}
+=head2 isa
+
+ $obj->isa('TYPE');
+ Class::Modular->isa('TYPE');
+
+Replaces UNIVERSAL's isa method with one that knows which modules have
+been loaded into this object. Calls C<is_loaded> with the type passed,
+then calls UNIVERSAL::isa if the type isn't loaded.
+
+=cut
+
+sub isa{
+ my ($self,$type) = @_;
+
+ croak "Usage: isa(object-ref, type);\n" if not defined $type;
+
+ return $self->is_loaded($type) || UNIVERSAL::isa($self,$type);
+}
+
+
=head2 handledby