File Coverage

blib/lib/Astro/VEX/Comment.pm
Criterion Covered Total %
statement 15 15 100.0
branch n/a
condition 1 3 33.3
subroutine 5 5 100.0
pod 0 2 0.0
total 21 25 84.0


line stmt bran cond sub pod time code
1             package Astro::VEX::Comment;
2              
3             =head1 NAME
4              
5             Astro::VEX::Comment - VEX (VLBI Experiment Definition) comment class
6              
7             =cut
8              
9 2     2   12 use strict;
  2         15  
  2         50  
10 2     2   9 use warnings;
  2         3  
  2         69  
11              
12             our $VERSION = '0.001';
13              
14 2     2   9 use overload '""' => 'stringify';
  2         3  
  2         8  
15              
16             sub new {
17 1   33 1 0 3359 my $proto = shift; my $class = ref($proto) || $proto;
  1         7  
18 1         2 my $text = shift;
19              
20 1         29 return bless {
21             TEXT => $text,
22             }, $class;
23             }
24              
25             sub stringify {
26 1     1 0 3 my $self = shift;
27              
28 1         29 return '*' . $self->{'TEXT'};
29             }
30              
31             1;
32              
33             __END__