package UNIVERSAL::extends;
use strict;
use vars qw($VERSION);
$VERSION = 0.01;
package UNIVERSAL;
no strict 'refs';
sub extends {
my($child, @base) = @_;
my $pkg = caller(0);
die "extends() should be called with class." if ref $child;
die "inheritor/caller mismatch: $child ne $pkg" if $child ne $pkg;
eval <extends('Animal');
# same as use base qw(Animal)
=head1 DESCRIPTION
UNIVERSAL::extends is a syntactic sugar of base.pm for Java programmers.
=head1 AUTHOR
Tatsuhiko Miyagawa Emiyagawa@bulknews.netE
This library is free software; you can redistribute it and/or modify
it under the same terms as Perl itself.
=head1 SEE ALSO
L, L, L
=cut