| 1 | package Mason::Component::Import; | ||
| 2 | $Mason::Component::Import::VERSION = '2.23'; | ||
| 3 | use strict; | ||
| 4 | use warnings; | ||
| 5 | |||
| 6 | sub import { | ||
| 7 | my $class = shift; | ||
| 8 | my $caller = caller; | ||
| 9 | $class->import_into($caller); | ||
| 10 | } | ||
| 11 | |||
| 12 | sub import_into { | ||
| 13 | 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 |