1use strict; 2use warnings; 3 4use Test::More tests => 5; 5 6my $parent_class = 'File::Fetch'; 7my $child_class = 'File::Fetch::Subclass'; 8 9use_ok( $parent_class ); 10 11my $ff_parent = $parent_class->new( uri => 'http://example.com/index.html' ); 12isa_ok( $ff_parent, $parent_class ); 13 14can_ok( $child_class, qw( new fetch ) ); 15my $ff_child = $child_class->new( uri => 'http://example.com/index.html' ); 16isa_ok( $ff_child, $child_class ); 17isa_ok( $ff_child, $parent_class ); 18 19BEGIN { 20 package File::Fetch::Subclass; 21 use vars qw(@ISA); 22 unshift @ISA, qw(File::Fetch); 23 } 24