Commit | Line | Data |
3eca5b1c |
1 | package oose; |
2 | use strict; |
3 | our $VERSION = '0.0.1'; |
4 | |
5 | BEGIN { |
6 | my $package; |
7 | sub import { $package = $_[1] } |
8 | use Filter::Simple sub { s/^/package $package;\nuse Moose;\n/; } |
9 | } |
10 | 1; # Magic true value required at end of module |
11 | __END__ |
12 | |
13 | =head1 NAME |
14 | |
15 | oose - syntactic sugar to make Moose Onliners easier |
16 | |
17 | |
18 | =head1 VERSION |
19 | |
20 | This document describes oose version 0.0.1 |
21 | |
22 | |
23 | =head1 SYNOPSIS |
24 | |
25 | perl -Moose=Foo -e 'has bar => ( is=>q[ro], default => q[baz] ); print Foo->new->bar' # prints baz |
26 | |
27 | =head1 DESCRIPTION |
28 | |
29 | oose.pm is a Source filter that simply adds C<package $name; use Moose;> to the beginning of your script |
30 | and was entirely created because typing perl -e'package Foo; use Moose; ...' was annoying me. |
31 | |
32 | =head1 INTERFACE |
33 | |
34 | oose provides exactly one method and it's automically called by perl: |
1aa48307 |
35 | |
3eca5b1c |
36 | =over |
37 | |
38 | =item import(str) |
39 | |
40 | pass a package name to import to be used by the source filter |
41 | |
42 | =back |
43 | |
44 | =head1 CONFIGURATION AND ENVIRONMENT |
45 | |
46 | =for author to fill in: |
47 | A full explanation of any configuration system(s) used by the |
48 | module, including the names and locations of any configuration |
49 | files, and the meaning of any environment variables or properties |
50 | that can be set. These descriptions must also include details of any |
51 | configuration language used. |
52 | |
53 | oose requires no configuration files or environment variables. |
54 | |
55 | =head1 DEPENDENCIES |
56 | |
57 | =for author to fill in: |
58 | A list of all the other modules that this module relies upon, |
59 | including any restrictions on versions, and an indication whether |
60 | the module is part of the standard Perl distribution, part of the |
61 | module's distribution, or must be installed separately. ] |
62 | |
63 | You will need L<Filter::Simple> and eventually L<Moose> |
64 | |
65 | |
66 | =head1 INCOMPATIBILITIES |
67 | |
68 | =for author to fill in: |
69 | A list of any modules that this module cannot be used in conjunction |
70 | with. This may be due to name conflicts in the interface, or |
71 | competition for system or program resources, or due to internal |
72 | limitations of Perl (for example, many modules that use source code |
73 | filters are mutually incompatible). |
74 | |
75 | None reported. But it is a source filter and might have issues there. |
76 | |
77 | =head1 BUGS AND LIMITATIONS |
78 | |
79 | =for author to fill in: |
80 | A list of known problems with the module, together with some |
81 | indication Whether they are likely to be fixed in an upcoming |
82 | release. Also a list of restrictions on the features the module |
83 | does provide: data types that cannot be handled, performance issues |
84 | and the circumstances in which they may arise, practical |
85 | limitations on the size of data sets, special cases that are not |
86 | (yet) handled, etc. |
87 | |
88 | No bugs have been reported. |
89 | |
90 | Please report any bugs or feature requests to |
91 | C<bug-oose@rt.cpan.org>, or through the web interface at |
92 | L<http://rt.cpan.org>. |
93 | |
94 | |
95 | =head1 AUTHOR |
96 | |
97 | Chris Prather C<< <perigrin@cpan.org> >> |
98 | |
99 | |
100 | =head1 LICENCE AND COPYRIGHT |
101 | |
102 | Copyright (c) 2007, Chris Prather C<< <perigrin@cpan.org> >>. All rights reserved. |
103 | |
104 | This module is free software; you can redistribute it and/or |
105 | modify it under the same terms as Perl itself. See L<perlartistic>. |
106 | |
107 | |
108 | =head1 DISCLAIMER OF WARRANTY |
109 | |
110 | BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY |
111 | FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN |
112 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES |
113 | PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER |
114 | EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED |
115 | WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE |
116 | ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH |
117 | YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL |
118 | NECESSARY SERVICING, REPAIR, OR CORRECTION. |
119 | |
120 | IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING |
121 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR |
122 | REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE |
123 | LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, |
124 | OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE |
125 | THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING |
126 | RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A |
127 | FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF |
128 | SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF |
129 | SUCH DAMAGES. |