blib/lib/Template/Plugin/RPM2.pm

filter: Statementstmt 81.8% 9 / 11 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 4 / 4 Podpod n/a totaltotal 86.6% 13 / 15 CC 1 SCAR 0.7
CC
1
Cov
82%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 package Template::Plugin::RPM2;
2  
3 3 ▶use 5.006;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 3 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 3 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 0 ▶use RPM2;
Subroutine BEGIN: called CC=1 SCAR=2.6
8 use Template::Plugin;
9  
10 require Exporter;
11  
12 our @ISA = qw(Exporter RPM2 Template::Plugin);
13  
14 =head1 NAME
15  
16 Template::Plugin::RPM2 - Template Toolkit plugin for RPM2
17  
18 =head1 VERSION
19  
20 Version 1.3.2
21  
22 =cut
23  
24 our $VERSION = '1.3.4';
25  
26 =head1 SYNOPSIS
27  
28 Access details of an RPM file from within a Template Toolkit template.
29  
30 [% USE pkg = RPM2(file) %]
31 Name: [% pkg.name %]
32 Version: [% pkg.version %]
33 Release: [% pkg.release %]
34 Group: [% pkg.group %]
35 Packager: [% pkg.packager %]
36  
37 =head1 METHODS
38  
39 =head2 new
40  
41 Creates a new Template::Plugin::RPM2 object. Usually called from a template.
42  
43 =cut
44  
45 sub new {
46 my ($class, $context, $file) = @_;
47  
48 my $self = $class->SUPER::open_package($file);
49  
50 return $self;
51 }
52  
53 =head1 SEE ALSO
54  
55 =over 4
56  
57 =item *
58  
59 L<Template> (the Template Toolkit)
60  
61 =item *
62  
63 L<RPM2>
64  
65 =back
66  
67 =head1 AUTHOR
68  
69 Dave Cross, C<< <dave@perlhacks.com> >>
70  
71 =head1 BUGS
72  
73 Please report any bugs or feature requests to
74 C<bug-template-plugin-rpm2@rt.cpan.org>, or through the web interface at
75 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Template-Plugin-RPM2>.
76 I will be notified, and then you'll automatically be notified of progress on
77 your bug as I make changes.
78  
79 =head1 ACKNOWLEDGEMENTS
80  
81 =head1 COPYRIGHT & LICENSE
82  
83 Copyright (c) 2006-20 Magnum Solutions Ltd., all rights reserved.
84  
85 This program is free software; you can redistribute it and/or modify it
86 under the same terms as Perl itself.
87  
88 =cut
89  
90 1; # End of Template::Plugin::RPM2
↑ Summary