File Coverage

blib/lib/Mason/Component/Import.pm
Criterion Covered Total %
statement 10 10 100.0
branch n/a
condition n/a
subroutine 4 4 100.0
pod 0 1 0.0
total 14 15 93.3


line stmt bran cond sub pod time code
1             package Mason::Component::Import;
2             $Mason::Component::Import::VERSION = '2.24';
3 19     19   13128 use strict;
  19         65  
  19         798  
4 19     19   89 use warnings;
  19         24  
  19         2139  
5              
6             sub import {
7 227     227   514 my $class = shift;
8 227         743 my $caller = caller;
9 227         4109 $class->import_into($caller);
10             }
11              
12             sub import_into {
13 227     227 0 25524 my ( $class, $for_class ) = @_;
14              
15             # no-op by default
16             }
17              
18             1;
19              
20             __END__
21              
22             =pod
23              
24             =head1 NAME
25              
26             Mason::Component::Import - Extra component imports
27              
28             =head1 DESCRIPTION
29              
30             This module is automatically use'd in each generated Mason component class. It
31             imports nothing by default, but you can modify the C<import_into> method in
32             plugins to add imports.
33              
34             =head1 SEE ALSO
35              
36             L<Mason|Mason>
37              
38             =head1 AUTHOR
39              
40             Jonathan Swartz <swartz@pobox.com>
41              
42             =head1 COPYRIGHT AND LICENSE
43              
44             This software is copyright (c) 2012 by Jonathan Swartz.
45              
46             This is free software; you can redistribute it and/or modify it under
47             the same terms as the Perl 5 programming language system itself.
48              
49             =cut