Codebase list libmasonx-processdir-perl / c1defb81-81cc-4f17-acf4-60e2e750366c/upstream
Import upstream version 0.02+git20120307.1.3bb9810 Debian Janitor 2 years ago
8 changed file(s) with 108 addition(s) and 200 deletion(s). Raw diff Collapse all Expand all
0
10 This is the Perl distribution MasonX-ProcessDir.
21
32 Installing MasonX-ProcessDir is straightforward.
87
98 % cpanm MasonX::ProcessDir
109
11 If you are installing into a system-wide directory, you may need to pass the
12 "-S" flag to cpanm, which uses sudo to install the module:
13
14 % cpanm -S MasonX::ProcessDir
10 If it does not have permission to install modules to the current perl, cpanm
11 will automatically set up and install to a local::lib in your home directory.
12 See the local::lib documentation (https://metacpan.org/pod/local::lib) for
13 details on enabling it in your environment.
1514
1615 ## Installing with the CPAN shell
1716
2120
2221 ## Manual installation
2322
24 As a last resort, you can manually install it. Download the tarball, untar it,
25 then build it:
23 As a last resort, you can manually install it. If you have not already
24 downloaded the release tarball, you can find the download link on the module's
25 MetaCPAN page: https://metacpan.org/pod/MasonX::ProcessDir
26
27 Untar the tarball, install configure prerequisites (see below), then build it:
2628
2729 % perl Makefile.PL
2830 % make && make test
3133
3234 % make install
3335
34 If you are installing into a system-wide directory, you may need to run:
36 On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
3537
36 % sudo make install
38 If your perl is system-managed, you can create a local::lib in your home
39 directory to install modules to. For details, see the local::lib documentation:
40 https://metacpan.org/pod/local::lib
41
42 The prerequisites of this distribution will also have to be installed manually. The
43 prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
44 by running the manual build process described above.
45
46 ## Configure Prerequisites
47
48 This distribution requires other modules to be installed before this
49 distribution's installer can be run. They can be found under the
50 "configure_requires" key of META.yml or the
51 "{prereqs}{configure}{requires}" key of META.json.
52
53 ## Other Prerequisites
54
55 This distribution may require additional modules to be installed after running
56 Makefile.PL.
57 Look for prerequisites in the following phases:
58
59 * to run make, PHASE = build
60 * to use the module code itself, PHASE = runtime
61 * to run tests, PHASE = test
62
63 They can all be found in the "PHASE_requires" key of MYMETA.yml or the
64 "{prereqs}{PHASE}{requires}" key of MYMETA.json.
3765
3866 ## Documentation
3967
4068 MasonX-ProcessDir documentation is available as POD.
41 You can run perldoc from a shell to read the documentation:
69 You can run `perldoc` from a shell to read the documentation:
4270
4371 % perldoc MasonX::ProcessDir
72
73 For more information on installing Perl modules via CPAN, please see:
74 https://www.cpan.org/modules/INSTALL.html
1717
1818 The GNU General Public License, Version 1, February 1989
1919
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
20 GNU GENERAL PUBLIC LICENSE
21 Version 1, February 1989
2222
2323 Copyright (C) 1989 Free Software Foundation, Inc.
24 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA
24 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
25
2526 Everyone is permitted to copy and distribute verbatim copies
2627 of this license document, but changing it is not allowed.
2728
28 Preamble
29 Preamble
2930
3031 The license agreements of most software companies try to keep users
3132 at the mercy of those companies. By contrast, our General Public
6667 The precise terms and conditions for copying, distribution and
6768 modification follow.
6869
69 GNU GENERAL PUBLIC LICENSE
70 GNU GENERAL PUBLIC LICENSE
7071 TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
7172
7273 0. This License Agreement applies to any program or other work which
184185 of preserving the free status of all derivatives of our free software and
185186 of promoting the sharing and reuse of software generally.
186187
187 NO WARRANTY
188 NO WARRANTY
188189
189190 9. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
190191 FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
206207 PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
207208 POSSIBILITY OF SUCH DAMAGES.
208209
209 END OF TERMS AND CONDITIONS
210
211 Appendix: How to Apply These Terms to Your New Programs
210 END OF TERMS AND CONDITIONS
211
212 Appendix: How to Apply These Terms to Your New Programs
212213
213214 If you develop a new program, and you want it to be of the greatest
214215 possible use to humanity, the best way to achieve this is to make it
234235 GNU General Public License for more details.
235236
236237 You should have received a copy of the GNU General Public License
237 along with this program; if not, write to the Free Software Foundation,
238 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
238 along with this program; if not, write to the Free Software
239 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston MA 02110-1301 USA
240
239241
240242 Also add information on how to contact you by electronic and paper mail.
241243
289291
290292 - "Package" refers to the collection of files distributed by the Copyright
291293 Holder, and derivatives of that collection of files created through
292 textual modification.
294 textual modification.
293295 - "Standard Version" refers to such a Package if it has not been modified,
294296 or has been modified in accordance with the wishes of the Copyright
295 Holder.
297 Holder.
296298 - "Copyright Holder" is whoever is named in the copyright or copyrights for
297 the package.
299 the package.
298300 - "You" is you, if you're thinking about copying or distributing this Package.
299301 - "Reasonable copying fee" is whatever you can justify on the basis of media
300302 cost, duplication charges, time of people involved, and so on. (You will
301303 not be required to justify it to the Copyright Holder, but only to the
302 computing community at large as a market that must bear the fee.)
304 computing community at large as a market that must bear the fee.)
303305 - "Freely Available" means that no fee is charged for the item itself, though
304306 there may be fees involved in handling the item. It also means that
305307 recipients of the item may redistribute it under the same conditions they
306 received it.
308 received it.
307309
308310 1. You may make and give away verbatim copies of the source form of the
309311 Standard Version of this Package without restriction, provided that you
370372
371373 9. THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
372374 WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
373 MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
375 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
374376
375377 The End
376378
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.024.
01 Changes
12 INSTALL
23 LICENSE
33 "Jonathan Swartz <swartz@pobox.com>"
44 ],
55 "dynamic_config" : 0,
6 "generated_by" : "Dist::Zilla version 4.200008, CPAN::Meta::Converter version 2.113640",
6 "generated_by" : "Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010",
77 "license" : [
88 "perl_5"
99 ],
1515 "prereqs" : {
1616 "configure" : {
1717 "requires" : {
18 "ExtUtils::MakeMaker" : "6.30"
18 "ExtUtils::MakeMaker" : "0"
1919 }
2020 },
2121 "runtime" : {
2626 },
2727 "test" : {
2828 "requires" : {
29 "Test::More" : 0
29 "Test::More" : "0"
3030 }
3131 }
3232 },
4242 "web" : "https://github.com/jonswar/perl-masonx-processdir"
4343 }
4444 },
45 "version" : "0.02"
45 "version" : "0.02",
46 "x_generated_by_perl" : "v5.34.0",
47 "x_serialization_backend" : "JSON::XS version 4.03",
48 "x_spdx_expression" : "Artistic-1.0-Perl OR GPL-1.0-or-later"
4649 }
4750
22 author:
33 - 'Jonathan Swartz <swartz@pobox.com>'
44 build_requires:
5 Test::More: 0
5 Test::More: '0'
66 configure_requires:
7 ExtUtils::MakeMaker: 6.30
7 ExtUtils::MakeMaker: '0'
88 dynamic_config: 0
9 generated_by: 'Dist::Zilla version 4.200008, CPAN::Meta::Converter version 2.113640'
9 generated_by: 'Dist::Zilla version 6.024, CPAN::Meta::Converter version 2.150010'
1010 license: perl
1111 meta-spec:
1212 url: http://module-build.sourceforge.net/META-spec-v1.4.html
13 version: 1.4
13 version: '1.4'
1414 name: MasonX-ProcessDir
1515 requires:
16 Any::Template::ProcessDir: 0.04
17 Mason: 2.10
16 Any::Template::ProcessDir: '0.04'
17 Mason: '2.10'
1818 resources:
1919 bugtracker: http://rt.cpan.org/NoAuth/Bugs.html?Dist=MasonX-ProcessDir
2020 repository: git://github.com/jonswar/perl-masonx-processdir.git
21 version: 0.02
21 version: '0.02'
22 x_generated_by_perl: v5.34.0
23 x_serialization_backend: 'YAML::Tiny version 1.73'
24 x_spdx_expression: 'Artistic-1.0-Perl OR GPL-1.0-or-later'
0
0 # This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.024.
11 use strict;
22 use warnings;
33
44
55
6 use ExtUtils::MakeMaker 6.30;
7
8
6 use ExtUtils::MakeMaker;
97
108 my %WriteMakefileArgs = (
11 'ABSTRACT' => 'Process a directory of Mason templates',
12 'AUTHOR' => 'Jonathan Swartz <swartz@pobox.com>',
13 'BUILD_REQUIRES' => {
14 'Test::More' => '0'
9 "ABSTRACT" => "Process a directory of Mason templates",
10 "AUTHOR" => "Jonathan Swartz <swartz\@pobox.com>",
11 "CONFIGURE_REQUIRES" => {
12 "ExtUtils::MakeMaker" => 0
1513 },
16 'CONFIGURE_REQUIRES' => {
17 'ExtUtils::MakeMaker' => '6.30'
14 "DISTNAME" => "MasonX-ProcessDir",
15 "LICENSE" => "perl",
16 "NAME" => "MasonX::ProcessDir",
17 "PREREQ_PM" => {
18 "Any::Template::ProcessDir" => "0.04",
19 "Mason" => "2.10"
1820 },
19 'DISTNAME' => 'MasonX-ProcessDir',
20 'EXE_FILES' => [],
21 'LICENSE' => 'perl',
22 'NAME' => 'MasonX::ProcessDir',
23 'PREREQ_PM' => {
24 'Any::Template::ProcessDir' => '0.04',
25 'Mason' => '2.10'
21 "TEST_REQUIRES" => {
22 "Test::More" => 0
2623 },
27 'VERSION' => '0.02',
28 'test' => {
29 'TESTS' => 't/*.t'
24 "VERSION" => "0.02",
25 "test" => {
26 "TESTS" => "t/*.t"
3027 }
3128 );
3229
3330
34 unless ( eval { ExtUtils::MakeMaker->VERSION(6.56) } ) {
35 my $br = delete $WriteMakefileArgs{BUILD_REQUIRES};
36 my $pp = $WriteMakefileArgs{PREREQ_PM};
37 for my $mod ( keys %$br ) {
38 if ( exists $pp->{$mod} ) {
39 $pp->{$mod} = $br->{$mod} if $br->{$mod} > $pp->{$mod};
40 }
41 else {
42 $pp->{$mod} = $br->{$mod};
43 }
44 }
31 my %FallbackPrereqs = (
32 "Any::Template::ProcessDir" => "0.04",
33 "Mason" => "2.10",
34 "Test::More" => 0
35 );
36
37
38 unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
39 delete $WriteMakefileArgs{TEST_REQUIRES};
40 delete $WriteMakefileArgs{BUILD_REQUIRES};
41 $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
4542 }
4643
4744 delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
4845 unless eval { ExtUtils::MakeMaker->VERSION(6.52) };
4946
5047 WriteMakefile(%WriteMakefileArgs);
51
52
53
+0
-120
README less more
0 NAME
1 MasonX::ProcessDir - Process a directory of Mason 2 templates
2
3 VERSION
4 version 0.02
5
6 SYNOPSIS
7 use MasonX::ProcessDir;
8
9 # Generate result files in the same directory as the templates
10 #
11 my $pd = MasonX::ProcessDir->new(
12 dir => '/path/to/dir'
13 );
14 $pd->process_dir();
15
16 # Generate result files in a separate directory
17 #
18 my $pd = MasonX::ProcessDir->new(
19 source_dir => '/path/to/source/dir',
20 dest_dir => '/path/to/dest/dir'
21 );
22 $pd->process_dir();
23
24 DESCRIPTION
25 Recursively processes a directory of Mason 2 templates, generating a set
26 of result files in the same directory or in a parallel directory.
27
28 Every file with suffix ".mc" will be processed, and the results placed
29 in a file of the same name without the suffix. ".mi", autobase and
30 dhandler files will be used by Mason when processing the templates but
31 will not generate files themselves.
32
33 For example, if the source directory contains
34
35 Base.mc
36 httpd.conf.mc
37 proxy.conf.mc
38 etc/crontab.mc
39 blah.mi
40 somefile.txt
41
42 and we run
43
44 my $pd = MasonX::ProcessDir->new(
45 source_dir => '/path/to/source/dir',
46 dest_dir => '/path/to/dest/dir'
47 );
48 $pd->process_dir();
49
50 then afterwards the destination directory will contain files
51
52 httpd.conf
53 proxy.conf
54 etc/crontab
55 somefile.txt
56
57 where *foo* and *bar* are the results of processing *foo.mc* and
58 *bar.mc* through Mason. *Base.mc* and *blah.mi* may be used during Mason
59 processing but won't generate result files themselves.
60
61 This class is a convenience extension of Any::Template::ProcessDir.
62
63 CONSTRUCTOR
64 Specifying directory/directories
65 * If you want to generate the result files in the same directory as
66 the templates, just specify *dir*.
67
68 my $pd = MasonX::ProcessDir->new(
69 dir => '/path/to/dir',
70 ...
71 );
72
73 * If you want to generate the result files in a separate directory
74 from the templates, specify *source_dir* and *dest_dir*.
75
76 my $pd = MasonX::ProcessDir->new(
77 source_dir => '/path/to/source/dir',
78 source_dir => '/path/to/dest/dir',
79 ...
80 );
81
82 Mason options
83 mason_options
84 An optional hash of options to the Mason interpreter. For example,
85 the default Mason data directory will be ".mason" under the source
86 directory, but you can override this:
87
88 mason_options => { data_dir => '/path/to/data/dir' }
89
90 Options inherited from Any::Template::ProcessDir
91 See Any::Template::ProcessDir for other options, such as
92
93 dir_create_mode
94 file_create_mode
95 readme_filename
96
97 SUPPORT AND DOCUMENTATION
98 Bugs and feature requests will be tracked at RT:
99
100 http://rt.cpan.org/NoAuth/Bugs.html?Dist=MasonX-ProcessDir
101 bug-masonx-processdir@rt.cpan.org
102
103 The latest source code can be browsed and fetched at:
104
105 http://github.com/jonswar/perl-masonx-processdir
106 git clone git://github.com/jonswar/perl-masonx-processdir.git
107
108 SEE ALSO
109 Mason, Any::Template::ProcessDir
110
111 AUTHOR
112 Jonathan Swartz <swartz@pobox.com>
113
114 COPYRIGHT AND LICENSE
115 This software is copyright (c) 2011 by Jonathan Swartz.
116
117 This is free software; you can redistribute it and/or modify it under
118 the same terms as the Perl 5 programming language system itself.
119
00 package MasonX::ProcessDir;
1 BEGIN {
2 $MasonX::ProcessDir::VERSION = '0.02';
3 }
1 $MasonX::ProcessDir::VERSION = '0.02';
42 use Mason;
53 use Moose;
64 use strict;
3533
3634 1;
3735
38
36 __END__
3937
4038 =pod
4139
186184 the same terms as the Perl 5 programming language system itself.
187185
188186 =cut
189
190
191 __END__
192