diff options
Diffstat (limited to 'Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm')
-rw-r--r-- | Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm | 38 |
1 files changed, 16 insertions, 22 deletions
diff --git a/Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm b/Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm index 729bf4fa6f4..65d31d25367 100644 --- a/Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm +++ b/Master/tlpkg/tlperl/lib/TAP/Parser/ResultFactory.pm @@ -1,9 +1,8 @@ package TAP::Parser::ResultFactory; use strict; -use vars qw($VERSION @ISA %CLASS_FOR); +use warnings; -use TAP::Object (); use TAP::Parser::Result::Bailout (); use TAP::Parser::Result::Comment (); use TAP::Parser::Result::Plan (); @@ -13,7 +12,7 @@ use TAP::Parser::Result::Unknown (); use TAP::Parser::Result::Version (); use TAP::Parser::Result::YAML (); -@ISA = 'TAP::Object'; +use base 'TAP::Object'; ############################################################################## @@ -30,11 +29,11 @@ TAP::Parser::ResultFactory - Factory for creating TAP::Parser output objects =head1 VERSION -Version 3.26 +Version 3.30 =cut -$VERSION = '3.26'; +our $VERSION = '3.30'; =head2 DESCRIPTION @@ -83,8 +82,7 @@ a completely new type, eg: # create a custom result type: package MyResult; use strict; - use vars qw(@ISA); - @ISA = 'TAP::Parser::Result'; + use base 'TAP::Parser::Result'; # register with the factory: TAP::Parser::ResultFactory->register_type( 'my_type' => __PACKAGE__ ); @@ -96,18 +94,16 @@ Your custom type should then be picked up automatically by the L<TAP::Parser>. =cut -BEGIN { - %CLASS_FOR = ( - plan => 'TAP::Parser::Result::Plan', - pragma => 'TAP::Parser::Result::Pragma', - test => 'TAP::Parser::Result::Test', - comment => 'TAP::Parser::Result::Comment', - bailout => 'TAP::Parser::Result::Bailout', - version => 'TAP::Parser::Result::Version', - unknown => 'TAP::Parser::Result::Unknown', - yaml => 'TAP::Parser::Result::YAML', - ); -} +our %CLASS_FOR = ( + plan => 'TAP::Parser::Result::Plan', + pragma => 'TAP::Parser::Result::Pragma', + test => 'TAP::Parser::Result::Test', + comment => 'TAP::Parser::Result::Comment', + bailout => 'TAP::Parser::Result::Bailout', + version => 'TAP::Parser::Result::Version', + unknown => 'TAP::Parser::Result::Unknown', + yaml => 'TAP::Parser::Result::YAML', +); sub class_for { my ( $class, $type ) = @_; @@ -166,12 +162,10 @@ Of course, it's up to you to decide whether or not to ignore them. package MyResultFactory; use strict; - use vars '@ISA'; use MyResult; - use TAP::Parser::ResultFactory; - @ISA = qw( TAP::Parser::ResultFactory ); + use base 'TAP::Parser::ResultFactory'; # force all results to be 'MyResult' sub class_for { |