File Coverage

blib/lib/public.pm
Criterion Covered Total %
statement 19 19 100.0
branch 3 4 75.0
condition n/a
subroutine 5 5 100.0
pod n/a
total 27 28 96.4


line stmt bran cond sub pod time code
1             package public;
2              
3 5     5   81611 use strict;
  5         12  
  5         276  
4              
5 5     5   37 use vars qw($VERSION);
  5         11  
  5         307  
6              
7             $VERSION = 0.04;
8              
9 5     5   2459 use Class::Fields::Fuxor;
  5         12  
  5         398  
10 5     5   27 use Class::Fields::Attribs;
  5         41  
  5         990  
11              
12             sub import {
13             #Dump the class.
14 7     7   4911 shift;
15            
16 7         19 my $pack = caller;
17 7         18 foreach my $field (@_) {
18 16 100       76 if( $field =~ /^_/ ) {
19 1         17 require Carp;
20 1 50       275 Carp::carp("Use of leading underscores to name public data ",
21             "fields is considered unwise.") if $^W;
22             }
23             }
24 7         35 add_fields($pack, PUBLIC, @_);
25             }
26              
27              
28             return <
29             Displaying one's member publicly will often get one arrested for
30             indecent exposure.
31             TIP
32              
33             __END__