Enbld/Definition/Pcre.pm untested

filter: Statementstmt 0.0% 0 / 31 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 7 Podpod 0.0% 0 / 4 totaltotal 0.0% 0 / 42 SCAR 6.9
CC
1
Cov
0%
initialize
2.0
set_argument
2.0
set_index_parser_form
2.0
CRAP 2.0
1 package Enbld::Definition::Pcre;
2  
3 use strict;
4 use warnings;
5  
6 use parent qw/Enbld::Definition/;
7  
8 sub initialize {
9 my $self = shift;
10  
11 $self->SUPER::initialize;
12  
13 $self->{defined}{IndexSite} =
14 'http://sourceforge.net/projects/pcre/files/pcre/';
15
16 $self->{defined}{AdditionalArgument} = \&set_argument;
17 $self->{defined}{ArchiveName} = 'pcre';
18 $self->{defined}{WebSite} = 'http://www.pcre.org';
19 $self->{defined}{VersionForm} = '\d\.\d{1,2}';
20 $self->{defined}{DownloadSite} =
21 'http://sourceforge.net/projects/pcre/files/pcre/';
22  
23 $self->{defined}{IndexParserForm} = \&set_index_parser_form;
24 $self->{defined}{URL} = \&set_URL;
25  
26 return $self;
27 }
28  
29 sub set_argument {
30 my $args = '--enable-utf --enable-unicode-properties';
31  
32 return $args;
33 };
34  
35 sub set_index_parser_form {
36 my $attributes = shift;
37  
38 my $index_parser_form = '<a href="/projects/pcre/files/pcre/' .
39 $attributes->VersionForm . '/stats/timeline"';
40  
41 return $index_parser_form;
42 }
43  
44 sub set_URL {
45 my $attributes = shift;
46  
47 my $site = 'http://sourceforge.net/projects/pcre/files/pcre/';
48  
49 my $dir = $attributes->Version;
50 my $file = $attributes->ArchiveName . '-' . $attributes->Version .
51 '.' . $attributes->Extension;
52  
53 my $url = $site . $dir . '/' . $file . '/download';
54  
55 return $url;
56 }
57  
58 1;
59  
60 =pod
61  
62 =head1 NAME
63  
64 Enbld::Definition::Pcre - definition module for Perl Compatible Regular Expressions
65  
66 =head1 SEE ALSO
67  
68 L<Perl Compatible Regular Expressions|http://www.pcre.org>
69  
70 L<Enbld::Definition>
71  
72 =head1 COPYRIGHT
73  
74 copyright 2013- Magnolia C<< <magnolia.k@me.com> >>.
75  
76 =head1 LICENSE
77  
78 This is free software; you can redistribute it and/or modify it under
79 the same terms as the Perl 5 programming language system itself.
80  
81 =cut