File Coverage

blib/lib/inc/Module/Install/DSL.pm
Criterion Covered Total %
statement 7 8 87.5
branch n/a
condition n/a
subroutine 3 4 75.0
pod n/a
total 10 12 83.3


line stmt bran cond sub pod time code
1             package inc::Module::Install::DSL;
2              
3             # This module ONLY loads if the user has manually installed their own
4             # installation of Module::Install, and are some form of MI author.
5             #
6             # It runs from the installed location, and is never bundled
7             # along with the other bundled modules.
8             #
9             # So because the version of this differs from the version that will
10             # be bundled almost every time, it doesn't have it's own version and
11             # isn't part of the synchronisation-checking.
12              
13 1     1   568 use strict;
  1         1  
  1         27  
14 1     1   5 use vars qw{$VERSION};
  1         1  
  1         56  
15             BEGIN {
16             # While this version will be overwritten when Module::Install
17             # loads, it remains so Module::Install itself can detect which
18             # version an author currently has installed.
19             # This allows it to implement any back-compatibility features
20             # it may want or need to.
21 1     1   144 $VERSION = '1.19';
22             }
23              
24             if ( -d './inc' ) {
25             my $author = $^O eq 'VMS' ? './inc/_author' : './inc/.author';
26             if ( -d $author ) {
27             $Module::Install::AUTHOR = 1;
28             require File::Path;
29             File::Path::rmtree('inc');
30             }
31             } else {
32             $Module::Install::AUTHOR = 1;
33             }
34              
35             unshift @INC, 'inc' unless $INC[0] eq 'inc';
36             require inc::Module::Install;
37             require Module::Install::DSL;
38              
39             # Tie our import to the main one
40             sub import {
41 0     0     goto &Module::Install::DSL::import;
42             }
43              
44             1;
45              
46             =pod
47              
48             =head1 NAME
49              
50             inc::Module::Install::DSL - Domain Specific Language for Module::Install
51              
52             =head1 SYNOPSIS
53              
54             use inc::Module::Install::DSL 0.80;
55            
56             all_from lib/ADAMK/Repository.pm
57             requires File::Spec 3.29
58             requires File::pushd 1.00
59             requires File::Find::Rule 0.30
60             requires File::Find::Rule::VCS 1.05
61             requires File::Flat 0
62             requires File::Remove 1.42
63             requires IPC::Run3 0.034
64             requires Object::Tiny 1.06
65             requires Params::Util 0.35
66             requires CPAN::Version 5.5
67             test_requires Test::More 0.86
68             test_requires Test::Deep 1.03
69             install_script adamk
70            
71             requires_external_bin svn
72              
73             =head1 DESCRIPTION
74              
75             One of the primary design goals of L is to simplify
76             the creation of F scripts.
77              
78             Part of this involves the gradual reduction of any and all superfluous
79             characters, with the ultimate goal of requiring no non-critical
80             information in the file.
81              
82             L is a simple B based
83             on the already-lightweight L command syntax.
84              
85             The DSL takes one command on each line, and then wraps the command
86             (and its parameters) with the normal quotes and semi-colons etc to
87             turn it into Perl code.
88              
89             =head1 SUPPORT
90              
91             Bugs should be reported via the CPAN bug tracker at
92              
93             L
94              
95             For other issues contact the author.
96              
97             =head1 AUTHORS
98              
99             Adam Kennedy Eadamk@cpan.orgE
100              
101             =head1 COPYRIGHT
102              
103             Copyright 2008 - 2012 Adam Kennedy.
104              
105             This program is free software; you can redistribute it and/or
106             modify it under the same terms as Perl itself.
107              
108             =cut