File Coverage

blib/lib/Template/Plugin/RPM2.pm
Criterion Covered Total %
statement 18 18 100.0
branch n/a
condition n/a
subroutine 6 6 100.0
pod 1 1 100.0
total 25 25 100.0


line stmt bran cond sub pod time code
1             package Template::Plugin::RPM2;
2              
3 3     3   287981 use 5.006;
  3         8  
  3         45  
4 3     3   8 use warnings;
  3         2  
  3         64  
5 3     3   9 use strict;
  3         3  
  3         44  
6              
7 3     3   607 use RPM2;
  3         124309  
  3         61  
8 3     3   639 use Template::Plugin;
  3         5802  
  3         224  
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 0.01
21            
22             =cut
23              
24             our $VERSION = '1.02';
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 1     1 1 27   my ($class, $context, $file) = @_;
47              
48 1         18   my $self = $class->SUPER::open_package($file);
49              
50 1         157497   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@mag-sol.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-9 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
91