File Coverage

gen/attr-PerlBean_Dependency_Import.pl
Criterion Covered Total %
statement 3 3 100.0
branch n/a
condition n/a
subroutine 1 1 100.0
pod n/a
total 4 4 100.0


line stmt bran cond sub pod time code
1 1     1   4 use strict;
  1         2  
  1         84  
2              
3             push(@::bean_desc, {
4             bean_opt => {
5             abstract => 'Import dependency in a Perl bean',
6             package => 'PerlBean::Dependency::Import',
7             use_perl_version => 5.005,
8             base => [ qw( PerlBean::Dependency ) ],
9             description => <
10             C is a class to express C dependencies to classes/modules/files in a C.
11             EOF
12             short_description => 'Import dependency in a Perl bean',
13             synopsis => "TODO\n",
14             },
15             attr_opt => [
16             {
17             method_factory_name => 'import_list',
18             type => 'MULTI',
19             ordered => 1,
20             short_description => 'the list after the C',
21             },
22             ],
23             meth_opt => [
24             {
25             method_name => 'write',
26             body => <<'EOF',
27             my $self = shift;
28             my $fh = shift;
29              
30             my $dn = $self->get_dependency_name();
31             my $tail ='';
32              
33             if ( $self->get_import_list() ) {
34             $tail .= ' ';
35             $tail .= join( ', ', $self->get_import_list() );
36             }
37             $fh->print( "import $dn$tail;\n" )
38             EOF
39             },
40             ],
41             } );
42              
43             1;