distro work
[p5sagit/Config-Any.git] / lib / Config / Any / Perl.pm
CommitLineData
f0e3c221 1package Config::Any::Perl;
2
3use strict;
4use warnings;
5
6=head1 NAME
7
8Config::Any::Perl - Load Perl config files
9
10=head1 DESCRIPTION
11
12Loads Perl files. Example:
13
14 {
15 name => 'TestApp',
16 'Controller::Foo' => {
17 foo => 'bar'
18 },
19 'Model::Baz' => {
20 qux => 'xyzzy'
21 }
22 }
23
24=head1 METHODS
25
26=head2 extensions( )
27
28return an array of valid extensions (C<pl>, C<perl>).
29
30=cut
31
32sub extensions {
33 return qw( pl perl );
34}
35
36=head2 load( $file )
37
38Attempts to load C<$file> as a Perl file.
39
40=cut
41
42sub load {
43 my $class = shift;
44 my $file = shift;
45 return eval { require $file };
46}
47
48=head1 AUTHOR
49
50=over 4
51
52=item * Brian Cassidy E<lt>bricas@cpan.orgE<gt>
53
54=back
55
56=head1 COPYRIGHT AND LICENSE
57
58Copyright 2006 by Brian Cassidy
59
60This library is free software; you can redistribute it and/or modify
61it under the same terms as Perl itself.
62
63=head1 SEE ALSO
64
65=over 4
66
67=item * L<Catalyst>
68
69=item * L<Config::Any>
70
71=back
72
73=cut
74
751;