Codebase list libmasonx-processdir-perl / 54d0f5bc-ed8e-4bac-a8f0-9054ff02bb3a/upstream
Import upstream version 0.02+git20120307.1.3bb9810 Debian Janitor 2 years ago
8 changed file(s) with 98 addition(s) and 193 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
2221 ## Manual installation
2322
2423 As a last resort, you can manually install it. Download the tarball, untar it,
25 then build it:
24 install configure prerequisites (see below), then build it:
2625
2726 % perl Makefile.PL
2827 % make && make test
3130
3231 % make install
3332
34 If you are installing into a system-wide directory, you may need to run:
33 On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.
3534
36 % sudo make install
35 If your perl is system-managed, you can create a local::lib in your home
36 directory to install modules to. For details, see the local::lib documentation:
37 https://metacpan.org/pod/local::lib
38
39 The prerequisites of this distribution will also have to be installed manually. The
40 prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
41 by running the manual build process described above.
42
43 ## Configure Prerequisites
44
45 This distribution requires other modules to be installed before this
46 distribution's installer can be run. They can be found under the
47 "configure_requires" key of META.yml or the
48 "{prereqs}{configure}{requires}" key of META.json.
49
50 ## Other Prerequisites
51
52 This distribution may require additional modules to be installed after running
53 Makefile.PL.
54 Look for prerequisites in the following phases:
55
56 * to run make, PHASE = build
57 * to use the module code itself, PHASE = runtime
58 * to run tests, PHASE = test
59
60 They can all be found in the "PHASE_requires" key of MYMETA.yml or the
61 "{prereqs}{PHASE}{requires}" key of MYMETA.json.
3762
3863 ## Documentation
3964
4065 MasonX-ProcessDir documentation is available as POD.
41 You can run perldoc from a shell to read the documentation:
66 You can run `perldoc` from a shell to read the documentation:
4267
4368 % perldoc MasonX::ProcessDir
69
70 For more information on installing Perl modules via CPAN, please see:
71 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
0 # This file was automatically generated by Dist::Zilla::Plugin::Manifest v6.017.
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.017, 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.32.1",
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.017, 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.32.1
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.017.
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