Bug/Alert.pm

filter: Statementstmt 100% 22 / 22 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 6 / 6 Podpod 100% 1 / 1 totaltotal 100% 29 / 29 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.0
« Bug/SevenDayForecast.pm ↑ Summary Bug/DateParser.pm »
1 package Weather::Bug::Alert;
2  
3 12 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 12 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 12 ▶use Moose;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 12 ▶use XML::LibXML;
Subroutine BEGIN: called CC=1 SCAR=0.0
7 12 ▶use Weather::Bug;
Subroutine BEGIN: called CC=1 SCAR=0.0
8  
9 12 our $VERSION = '0.25';
10  
11 12 has 'type' => ( is => 'ro', isa => 'Str', init_arg => '-type' );
12 12 has 'title' => ( is => 'ro', isa => 'Str', init_arg => '-title' );
13  
14 sub from_xml
15 1 ▶{
Subroutine from_xml: called CC=1 SCAR=0.0
Pod documented
16 1 my $class = shift;
17 1 my $node = shift;
18  
19 1 return Weather::Bug::Alert->new(
20 -type => $node->findvalue( 'aws:type' ),
21 -title => $node->findvalue( 'aws:title' ),
22 );
23  
24 }
25  
26 12 1; # Magic true value required at end of module
27 __END__
« Bug/SevenDayForecast.pm ↑ Summary Bug/DateParser.pm »