line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Dist::Zilla::MintingProfile::Clustericious; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# ABSTRACT: Minting profile for Clustericious clients and servers |
4
|
|
|
|
|
|
|
our $VERSION = '0.02'; # VERSION |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1377
|
use Moose; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use v5.10; |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
with qw( Dist::Zilla::Role::MintingProfile ); |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
use namespace::autoclean; |
13
|
|
|
|
|
|
|
use File::ShareDir qw( dist_dir ); |
14
|
|
|
|
|
|
|
use Path::Class qw( dir file ); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub profile_dir |
17
|
|
|
|
|
|
|
{ |
18
|
|
|
|
|
|
|
my($self, $name) = @_; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
$name = 'app' if $name eq 'default'; |
21
|
|
|
|
|
|
|
my $dir; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
if(defined $ENV{DIST_ZILLA_MINTING_PROFILE_CLUSTERICIOUS}) |
24
|
|
|
|
|
|
|
{ |
25
|
|
|
|
|
|
|
$dir = dir( $ENV{DIST_ZILLA_MINTING_PROFILE_CLUSTERICIOUS} )->subdir($name); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
elsif(defined $Dist::Zilla::MintingProfile::Clustericious::VERSION) |
28
|
|
|
|
|
|
|
{ |
29
|
|
|
|
|
|
|
$dir = dir(dist_dir('Dist-Zilla-MintingProfile-Clustericious')) |
30
|
|
|
|
|
|
|
->subdir($name); |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
else |
33
|
|
|
|
|
|
|
{ |
34
|
|
|
|
|
|
|
# If $VERSION is not defined, then we are running out of a dist |
35
|
|
|
|
|
|
|
# that hasn't been dzil builded yet, so find the share directory |
36
|
|
|
|
|
|
|
# relative to this .pm file. |
37
|
|
|
|
|
|
|
$dir = file(__FILE__) |
38
|
|
|
|
|
|
|
->absolute |
39
|
|
|
|
|
|
|
->dir |
40
|
|
|
|
|
|
|
->parent |
41
|
|
|
|
|
|
|
->parent |
42
|
|
|
|
|
|
|
->parent |
43
|
|
|
|
|
|
|
->parent |
44
|
|
|
|
|
|
|
->subdir('share') |
45
|
|
|
|
|
|
|
->subdir($name); |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
die "no such Clustericious profile $name" unless -d $dir; |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
$dir; |
51
|
|
|
|
|
|
|
} |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
__END__ |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=pod |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=head1 NAME |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
Dist::Zilla::MintingProfile::Clustericious - Minting profile for Clustericious clients and servers |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head1 VERSION |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
version 0.02 |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
=head1 SYNOPSIS |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
# create a new app without database |
72
|
|
|
|
|
|
|
% dzil new -P Clustericious Foo |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
# create a new app with database |
75
|
|
|
|
|
|
|
% dzil new -P Clustericious -p mbd_app Foo |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
# create a new client, NOTE: name must end in ::Client |
78
|
|
|
|
|
|
|
% dzil new -P Clustericious -p client Foo::Client |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=head1 DESCRIPTION |
81
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
This minting profile is used to generate stub Clustericious |
83
|
|
|
|
|
|
|
applications in a L<Dist::Zilla> context. |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
=head1 AUTHOR |
86
|
|
|
|
|
|
|
|
87
|
|
|
|
|
|
|
Graham Ollis <plicease@cpan.org> |
88
|
|
|
|
|
|
|
|
89
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
This software is copyright (c) 2013 by NASA GSFC. |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
This is free software; you can redistribute it and/or modify it under |
94
|
|
|
|
|
|
|
the same terms as the Perl 5 programming language system itself. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |