File Coverage

blib/lib/Object/Meta/Plugin/Useful.pm
Criterion Covered Total %
statement 16 16 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 2 50.0
total 23 24 95.8


line stmt bran cond sub pod time code
1             #!/usr/bin/perl
2             # $Id: Useful.pm,v 1.1 2003/11/29 14:35:24 nothingmuch Exp $
3              
4             package Object::Meta::Plugin::Useful; # a base class for useful plugins, defines reasonable default methods
5              
6 4     4   20 use strict;
  4         10  
  4         101  
7 4     4   17 use warnings;
  4         6  
  4         89  
8              
9 4     4   16 use base 'Object::Meta::Plugin';
  4         6  
  4         730  
10              
11 4     4   2075 use Object::Meta::Plugin::ExportList;
  4         13  
  4         343  
12              
13             sub new {
14 31     31 0 1224 my $pkg = shift;
15            
16 31         161 bless {
17             exported => undef, # the export list thought to be currently relevant
18             exports => [], # the exports list
19             }, $pkg;
20             }
21              
22             sub init {
23 30     30 1 52 my $self = shift;
24 30         110 $self->{exported} = Object::Meta::Plugin::ExportList->new($self, @_); # create a new export list, with the methods as stated in the call to plug, and save it for future reference
25             }
26              
27             1; # Keep your mother happy.
28              
29             __END__