[svn-upgrade] new version libcatalyst-devel-perl (1.31)
Ansgar Burchardt
13 years ago
0 | 0 | This file documents the revision history for Perl extension Catalyst-Devel. |
1 | ||
2 | 1.31 2011-01-20 01:08:00 | |
3 | - Fix for copying generated files into installed apps + tests | |
4 | to ensure it keeps working. abraxxa++ | |
5 | - Make Pod tests author only | |
6 | ||
7 | 1.30 2011-01-11 23:54:00 | |
8 | - Increased Catalyst::Plugin::ConfigLoader dependency to 0.30 | |
9 | - Include File::Copy::Recursive in inc/ when building a dist of an | |
10 | application. | |
11 | ||
12 | 1.29 2011-01-11 23:51:00 | |
13 | - Add documentation for the --proc_title option to the generated | |
14 | fastcgi scripts | |
15 | - Don't bother with the BEGIN { use_ok dance for created tests | |
16 | - the test will fail to compile (and ergo fail) using just use, | |
17 | and that's less typing (and less copy-pasting) | |
18 | - Split method for creating tests into multiple methods to allow | |
19 | subclasses to override the generation of some tests. | |
20 | - Allow the author to be defined in the call to ->new to help things | |
21 | which want to call Catalyst::Helper programatically. | |
22 | - Remove $VERSION = eval $VERSION handwave in generated code as: | |
23 | - Gives a perl critic violation. | |
24 | - If you're shipping a dev release, best practice is you should do | |
25 | it by renaming the tarball, rather than having a _ in the VERSION. | |
26 | - Allow catalyst.pl . to work for already created applications | |
27 | when in the application's directory. | |
28 | - Note that plugin order is important in the generated skeleton. | |
29 | - Don't pollute M::I plugin detector with GetOptions symbol from | |
30 | GetOpt::Long | |
31 | - Fix typo in share/script/myapp_server.pl.tt (RT #58475) | |
1 | 32 | |
2 | 33 | 1.28 2010-06-16 02:43:00 |
3 | 34 | - Fix generated Pod tests so that the first check is if the TEST_POD |
1 | 1 | inc/Module/AutoInstall.pm |
2 | 2 | inc/Module/Install.pm |
3 | 3 | inc/Module/Install/AuthorRequires.pm |
4 | inc/Module/Install/AuthorTests.pm | |
4 | 5 | inc/Module/Install/AutoInstall.pm |
5 | 6 | inc/Module/Install/Base.pm |
6 | 7 | inc/Module/Install/Can.pm |
47 | 48 | share/t/03podcoverage.t.tt |
48 | 49 | share/t/comptest.tt |
49 | 50 | t/01use.t |
50 | t/02pod.t | |
51 | t/03podcoverage.t | |
51 | t/author/pod.t | |
52 | t/author/podcoverage.t | |
53 | t/author/version_numbers.t | |
52 | 54 | t/back_compat.t |
53 | 55 | t/generated_app.t |
54 | 56 | t/get_sharedir_file.t |
61 | 63 | t/optional_http-server-restart.t |
62 | 64 | t/render_file_contents.t |
63 | 65 | t/render_share_dir_file.t |
64 | xt/version_numbers.t |
18 | 18 | - inc |
19 | 19 | - share |
20 | 20 | - t |
21 | - xt | |
22 | 21 | requires: |
23 | 22 | Catalyst: 5.80015 |
24 | 23 | Catalyst::Action::RenderView: 0.10 |
25 | Catalyst::Plugin::ConfigLoader: 0.23 | |
24 | Catalyst::Plugin::ConfigLoader: 0.30 | |
26 | 25 | Catalyst::Plugin::Static::Simple: 0.28 |
27 | 26 | Config::General: 2.42 |
28 | 27 | ExtUtils::MakeMaker: 6.11 |
43 | 42 | homepage: http://dev.catalyst.perl.org/ |
44 | 43 | license: http://dev.perl.org/licenses/ |
45 | 44 | repository: git://git.shadowcat.co.uk/catagits/Catalyst-Devel.git |
46 | version: 1.28 | |
45 | version: 1.31 |
1 | 1 | use warnings; |
2 | 2 | use inc::Module::Install 0.91; |
3 | 3 | use Module::Install::AuthorRequires; |
4 | use Module::Install::AuthorTests; | |
4 | 5 | |
5 | 6 | name 'Catalyst-Devel'; |
6 | 7 | all_from 'lib/Catalyst/Devel.pm'; |
13 | 14 | requires 'Catalyst' => '5.80015'; |
14 | 15 | requires 'Catalyst::Action::RenderView' => '0.10'; |
15 | 16 | requires 'Catalyst::Plugin::Static::Simple' => '0.28'; |
16 | requires 'Catalyst::Plugin::ConfigLoader' => '0.23'; | |
17 | requires 'Catalyst::Plugin::ConfigLoader' => '0.30'; | |
17 | 18 | requires 'Config::General' => '2.42'; # as of 1.07, we use .conf and not .yaml |
18 | 19 | requires 'File::ChangeNotify' => '0.07'; |
19 | 20 | requires 'File::Copy::Recursive'; |
20 | requires 'Module::Install' => '0.91'; | |
21 | 21 | requires 'Path::Class' => '0.09'; |
22 | 22 | requires 'Template' => '2.14'; |
23 | ||
24 | # The Catalyst applications this module distribution have a Makefile.PL using | |
25 | # Module::Install as well as the Module::Install::Catalyst extension included in | |
26 | # this distribution. Therefore we really *depend* on Module::Install to be | |
27 | # installed, even though we also use it to build this distribution and include | |
28 | # it in its inc/ directory for releases. | |
29 | requires 'Module::Install' => '0.91'; | |
23 | 30 | |
24 | 31 | author_requires 'IPC::Run3'; |
25 | 32 | author_requires 'Module::Info'; |
28 | 35 | test_requires 'Test::More' => '0.94'; |
29 | 36 | |
30 | 37 | install_share 'share'; |
38 | ||
39 | author_tests 't/author'; | |
31 | 40 | |
32 | 41 | if ( $^O eq 'MSWin32' ) { |
33 | 42 | # Proc::Background needs this on Win32 but doesn't actually |
0 | #line 1 | |
1 | package Module::Install::AuthorTests; | |
2 | ||
3 | use 5.005; | |
4 | use strict; | |
5 | use Module::Install::Base; | |
6 | use Carp (); | |
7 | ||
8 | #line 16 | |
9 | ||
10 | use vars qw{$VERSION $ISCORE @ISA}; | |
11 | BEGIN { | |
12 | $VERSION = '0.002'; | |
13 | $ISCORE = 1; | |
14 | @ISA = qw{Module::Install::Base}; | |
15 | } | |
16 | ||
17 | #line 42 | |
18 | ||
19 | sub author_tests { | |
20 | my ($self, @dirs) = @_; | |
21 | _add_author_tests($self, \@dirs, 0); | |
22 | } | |
23 | ||
24 | #line 56 | |
25 | ||
26 | sub recursive_author_tests { | |
27 | my ($self, @dirs) = @_; | |
28 | _add_author_tests($self, \@dirs, 1); | |
29 | } | |
30 | ||
31 | sub _wanted { | |
32 | my $href = shift; | |
33 | sub { /\.t$/ and -f $_ and $href->{$File::Find::dir} = 1 } | |
34 | } | |
35 | ||
36 | sub _add_author_tests { | |
37 | my ($self, $dirs, $recurse) = @_; | |
38 | return unless $Module::Install::AUTHOR; | |
39 | ||
40 | my @tests = $self->tests ? (split / /, $self->tests) : 't/*.t'; | |
41 | ||
42 | # XXX: pick a default, later -- rjbs, 2008-02-24 | |
43 | my @dirs = @$dirs ? @$dirs : Carp::confess "no dirs given to author_tests"; | |
44 | @dirs = grep { -d } @dirs; | |
45 | ||
46 | if ($recurse) { | |
47 | require File::Find; | |
48 | my %test_dir; | |
49 | File::Find::find(_wanted(\%test_dir), @dirs); | |
50 | $self->tests( join ' ', @tests, map { "$_/*.t" } sort keys %test_dir ); | |
51 | } else { | |
52 | $self->tests( join ' ', @tests, map { "$_/*.t" } sort @dirs ); | |
53 | } | |
54 | } | |
55 | ||
56 | #line 107 | |
57 | ||
58 | 1; |
3 | 3 | use warnings; |
4 | 4 | |
5 | 5 | # Change Catalyst::Helper also. |
6 | our $VERSION = '1.28'; | |
6 | our $VERSION = '1.31'; | |
7 | 7 | our $CATALYST_SCRIPT_GEN = 40; |
8 | 8 | |
9 | 9 | $VERSION = eval $VERSION; |
12 | 12 | use Catalyst::Exception; |
13 | 13 | use Path::Class qw/dir file/; |
14 | 14 | use File::ShareDir qw/dist_dir/; |
15 | use YAML::Tiny; | |
15 | 16 | use namespace::autoclean; |
16 | 17 | |
17 | 18 | with 'MooseX::Emulate::Class::Accessor::Fast'; |
18 | 19 | |
19 | 20 | # Change Catalyst/Devel.pm also |
20 | our $VERSION = '1.28'; | |
21 | our $VERSION = '1.31'; | |
21 | 22 | |
22 | 23 | my %cache; |
23 | 24 | |
77 | 78 | # Needs to be here for PAR |
78 | 79 | require Catalyst; |
79 | 80 | |
81 | if($name eq '.') { | |
82 | if(!-e 'META.yml') { | |
83 | system perl => 'Makefile.PL' | |
84 | and Catalyst::Exception->throw(message => q( | |
85 | Failed to run "perl Makefile.PL". | |
86 | )); | |
87 | } | |
88 | ||
89 | $name = YAML::Tiny->read('META.yml')->[0]->{'name'}; | |
90 | $name =~ s/-/::/g; | |
91 | $self->{dir} = '.'; | |
92 | } | |
93 | ||
80 | 94 | if ( $name =~ /[^\w:]/ || $name =~ /^\d/ || $name =~ /\b:\b|:{3,}/) { |
81 | 95 | warn "Error: Invalid application name.\n"; |
82 | 96 | return 0; |
83 | 97 | } |
98 | ||
99 | ||
100 | if(!defined $self->{'dir'}) { | |
101 | $self->{dir} = $name; | |
102 | $self->{dir} =~ s/\:\:/-/g; | |
103 | } | |
104 | ||
84 | 105 | $self->{name } = $name; |
85 | $self->{dir } = $name; | |
86 | $self->{dir } =~ s/\:\:/-/g; | |
87 | 106 | $self->{script } = dir( $self->{dir}, 'script' ); |
88 | 107 | $self->{appprefix } = Catalyst::Utils::appprefix($name); |
89 | 108 | $self->{appenv } = Catalyst::Utils::class2env($name); |
92 | 111 | : "#!$Config{perlpath}"; |
93 | 112 | $self->{scriptgen } = $Catalyst::Devel::CATALYST_SCRIPT_GEN; |
94 | 113 | $self->{catalyst_version} = $Catalyst::VERSION; |
95 | $self->{author } = $self->{author} = $ENV{'AUTHOR'} | |
114 | $self->{author } ||= $ENV{'AUTHOR'} | |
96 | 115 | || eval { @{ [ getpwuid($<) ] }[6] } |
97 | 116 | || 'Catalyst developer'; |
98 | 117 | |
102 | 121 | |
103 | 122 | if ($gen_app) { |
104 | 123 | for ( qw/ _mk_dirs _mk_config _mk_appclass _mk_rootclass _mk_readme |
105 | _mk_changes _mk_apptest _mk_images _mk_favicon/ ) { | |
124 | _mk_changes _mk_apptest _mk_podtest _mk_podcoveragetest | |
125 | _mk_images _mk_favicon/ ) { | |
106 | 126 | |
107 | 127 | $self->$_; |
108 | 128 | } |
404 | 424 | my $self = shift; |
405 | 425 | my $t = $self->{t}; |
406 | 426 | $self->render_sharedir_file( file('t', '01app.t.tt'), file($t, "01app.t") ); |
427 | } | |
428 | ||
429 | sub _mk_podtest { | |
430 | my $self = shift; | |
431 | my $t = $self->{t}; | |
407 | 432 | $self->render_sharedir_file( file('t', '02pod.t.tt'), file($t, "02pod.t") ); |
433 | } | |
434 | ||
435 | sub _mk_podcoveragetest { | |
436 | my $self = shift; | |
437 | my $t = $self->{t}; | |
408 | 438 | $self->render_sharedir_file( file('t', '03podcoverage.t.tt'), file($t, "03podcoverage.t") ); |
409 | 439 | } |
410 | 440 |
7 | 7 | |
8 | 8 | use File::Find; |
9 | 9 | use FindBin; |
10 | use File::Copy::Recursive 'rcopy'; | |
10 | use File::Copy::Recursive; | |
11 | 11 | use File::Spec (); |
12 | use Getopt::Long qw(GetOptionsFromString :config no_ignore_case); | |
12 | use Getopt::Long (); | |
13 | 13 | use Data::Dumper; |
14 | 14 | |
15 | 15 | my $SAFETY = 0; |
57 | 57 | |
58 | 58 | sub catalyst { |
59 | 59 | my $self = shift; |
60 | ||
61 | if($Module::Install::AUTHOR) { | |
62 | $self->admin->copy_package( | |
63 | 'File::Copy::Recursive', | |
64 | $INC{"File/Copy/Recursive.pm"}, | |
65 | ); | |
66 | } | |
67 | ||
60 | 68 | print <<EOF; |
61 | 69 | *** Module::Install::Catalyst |
62 | 70 | EOF |
93 | 101 | my @path = split '-', $self->name; |
94 | 102 | for my $orig (@files) { |
95 | 103 | my $path = File::Spec->catdir( 'blib', 'lib', @path, $orig ); |
96 | rcopy( $orig, $path ); | |
104 | File::Copy::Recursive::rcopy( $orig, $path ); | |
97 | 105 | } |
98 | 106 | } |
99 | 107 | |
213 | 221 | |
214 | 222 | sub catalyst_par_options { |
215 | 223 | my ( $self, $optstring ) = @_; |
216 | my %o = (); | |
217 | 224 | eval "use PAR::Packer ()"; |
218 | 225 | if ($@) { |
219 | 226 | warn "WARNING: catalyst_par_options ignored - you need PAR::Packer\n" |
220 | 227 | } |
221 | 228 | else { |
222 | GetOptionsFromString($optstring, \%o, PAR::Packer->options); | |
229 | my $p = Getopt::Long::Parser->new(config => ['no_ignore_case']); | |
230 | my %o; | |
231 | require Text::ParseWords; | |
232 | { | |
233 | local @ARGV = Text::ParseWords::shellwords($optstring); | |
234 | $p->getoptions(\%o, PAR::Packer->options); | |
235 | } | |
223 | 236 | %PAROPTS = ( %PAROPTS, %o); |
224 | 237 | } |
225 | 238 | } |
3 | 3 | |
4 | 4 | use Catalyst::Runtime 5.80; |
5 | 5 | |
6 | # Set flags and add plugins for the application | |
6 | # Set flags and add plugins for the application. | |
7 | # | |
8 | # Note that ORDERING IS IMPORTANT here as plugins are initialized in order, | |
9 | # therefore you almost certainly want to keep ConfigLoader at the head of the | |
10 | # list if you're using it. | |
7 | 11 | # |
8 | 12 | # -Debug: activates the debug mode for very useful log messages |
9 | 13 | # ConfigLoader: will load the configuration from a Config::General file in the |
20 | 24 | extends 'Catalyst'; |
21 | 25 | |
22 | 26 | our $VERSION = '0.01'; |
23 | $VERSION = eval $VERSION; | |
24 | 27 | |
25 | 28 | # Configure the application. |
26 | 29 | # |
29 | 29 | or empty string to disable |
30 | 30 | -e --keeperr send error messages to STDOUT, not |
31 | 31 | to the webserver |
32 | --proc_title Set the process title (is possible) | |
32 | 33 | |
33 | 34 | =head1 DESCRIPTION |
34 | 35 |
31 | 31 | a restart when modified |
32 | 32 | (defaults to '\.yml$|\.yaml$|\.conf|\.pm$') |
33 | 33 | --restart_directory the directory to search for |
34 | modified files, can be set mulitple times | |
34 | modified files, can be set multiple times | |
35 | 35 | (defaults to '[SCRIPT_DIR]/..') |
36 | 36 | --follow_symlinks follow symlinks in search directories |
37 | 37 | (defaults to false. this is a no-op on Win32) |
2 | 2 | use warnings; |
3 | 3 | use Test::More; |
4 | 4 | |
5 | BEGIN { use_ok 'Catalyst::Test', '[% name %]' } | |
5 | use Catalyst::Test '[% name %]'; | |
6 | 6 | |
7 | 7 | ok( request('/')->is_success, 'Request should succeed' ); |
8 | 8 |
0 | 0 | use strict; |
1 | 1 | use warnings; |
2 | [% IF long_type == 'Controller' %][% IF mech %]use Test::More; | |
2 | use Test::More; | |
3 | [% IF long_type == 'Controller' %][% IF mech %] | |
3 | 4 | |
4 | eval "use Test::WWW::Mechanize::Catalyst '[% name %]'"; | |
5 | if ($@) { | |
5 | unless (eval q{use Test::WWW::Mechanize::Catalyst '[% name %]'; 1}) { | |
6 | 6 | plan skip_all => 'Test::WWW::Mechanize::Catalyst required'; |
7 | 7 | exit 0; |
8 | 8 | } |
10 | 10 | ok( my $mech = Test::WWW::Mechanize::Catalyst->new, 'Created mech object' ); |
11 | 11 | |
12 | 12 | $mech->get_ok( 'http://localhost[% uri %]' ); |
13 | [%- ELSE %]use Test::More; | |
13 | [%- ELSE %] | |
14 | 14 | |
15 | BEGIN { use_ok 'Catalyst::Test', '[% app %]' } | |
16 | BEGIN { use_ok '[% class %]' } | |
15 | use Catalyst::Test '[% app %]'; | |
16 | use [% class %]; | |
17 | 17 | |
18 | 18 | ok( request('[% uri %]')->is_success, 'Request should succeed' ); |
19 | 19 | [%- END -%] |
0 | use Test::More; | |
1 | ||
2 | eval "use Test::Pod 1.14"; | |
3 | plan skip_all => 'Test::Pod 1.14 required' if $@; | |
4 | plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; | |
5 | ||
6 | all_pod_files_ok(); |
0 | use Test::More; | |
1 | ||
2 | eval "use Test::Pod::Coverage 1.04"; | |
3 | plan skip_all => 'Test::Pod::Coverage 1.04 required' if $@; | |
4 | ||
5 | eval "use Pod::Coverage 0.20"; | |
6 | plan skip_all => 'Pod::Coverage 0.20 required' if $@; | |
7 | ||
8 | plan skip_all => 'set TEST_POD to enable this test' unless $ENV{TEST_POD}; | |
9 | ||
10 | all_pod_coverage_ok( { trustme => [ qr/^(?:BUILD|DEMOLISH)$/ ] } ); |
0 | use strict; | |
1 | use warnings; | |
2 | use Test::More; | |
3 | use Test::Pod::Coverage 1.04; | |
4 | use Pod::Coverage 0.20; | |
5 | ||
6 | all_pod_coverage_ok( { trustme => [ qr/^(?:BUILD|DEMOLISH)$/ ] } ); | |
7 |
0 | use strict; | |
1 | use warnings; | |
2 | ||
3 | use FindBin qw/$Bin/; | |
4 | use File::Spec; | |
5 | use File::Find::Rule; | |
6 | use Module::Info; | |
7 | ||
8 | use Test::More; | |
9 | ||
10 | my %versions; | |
11 | for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in(File::Spec->catdir($Bin, '..', '..', 'lib') ) ) { | |
12 | my $mod = Module::Info->new_from_file($pm_file); | |
13 | ||
14 | ( my $stripped_file = $pm_file ) =~ s{.*lib/}{}; | |
15 | ||
16 | $versions{$stripped_file} = $mod->version; | |
17 | } | |
18 | ||
19 | my $ver = delete $versions{'Catalyst/Devel.pm'}; | |
20 | ok $ver; | |
21 | ok scalar(keys %versions); | |
22 | ||
23 | for my $module ( sort keys %versions ) { | |
24 | next unless $versions{$module}; | |
25 | ||
26 | is( $versions{$module}, $ver, | |
27 | "version for $module is the same as in Catalyst/Devel.pm" ); | |
28 | } | |
29 | ||
30 | done_testing; | |
31 |
17 | 17 | unless -d $share_dir; |
18 | 18 | |
19 | 19 | $ENV{CATALYST_DEVEL_SHAREDIR} = $share_dir; |
20 | my $instdir = tempdir(CLEANUP => 1); | |
21 | ||
22 | $ENV{PERL_MM_OPT} = "INSTALL_BASE=$instdir"; | |
23 | $ENV{INSTALL_BASE} = $instdir; | |
24 | if ($ENV{MAKEFLAGS}) { | |
25 | $ENV{MAKEFLAGS} =~ s/PREFIX=[^\s]+//; | |
26 | $ENV{MAKEFLAGS} =~ s/INSTALL_BASE=[^\s]+//; | |
27 | } | |
20 | 28 | |
21 | 29 | my $dir = tempdir(CLEANUP => 1); |
22 | 30 | my $devnull = File::Spec->devnull; |
71 | 79 | script/testapp_create.pl |
72 | 80 | |; |
73 | 81 | |
74 | foreach my $fn (map { File::Spec->catdir(@$_) } map { [ split /\// ] } @files) { | |
82 | foreach my $fn (map { File::Spec->catdir(@$_) } map { [ File::Spec::Unix->splitdir($_) ] } @files) { | |
75 | 83 | test_fn($fn); |
76 | 84 | } |
77 | 85 | create_ok($_, 'My' . $_) for qw/Model View Controller/; |
83 | 91 | |
84 | 92 | run_generated_component_tests(); |
85 | 93 | |
94 | my $server_script_file = File::Spec->catdir(qw/script testapp_server.pl/); | |
86 | 95 | my $server_script = do { |
87 | open(my $fh, '<', File::Spec->catdir(qw/script testapp_server.pl/)) or fail $!; | |
96 | open(my $fh, '<', $server_script_file) or fail $!; | |
88 | 97 | local $/; |
89 | 98 | <$fh>; |
90 | 99 | }; |
93 | 102 | ok $server_script =~ qr/CATALYST_SCRIPT_GEN}\s+=\s+(\d+)/, |
94 | 103 | 'SCRIPT_GEN found in generated output'; |
95 | 104 | is $1, $Catalyst::Devel::CATALYST_SCRIPT_GEN, 'Script gen correct'; |
105 | ||
106 | { | |
107 | open(my $fh, '>', $server_script_file) or fail $!; | |
108 | print $fh "MOO\n"; | |
109 | } | |
110 | my $helper = Catalyst::Helper->new( | |
111 | { | |
112 | '.newfiles' => 0, | |
113 | 'makefile' => 0, | |
114 | 'scripts' => 1, | |
115 | name => '.', | |
116 | } | |
117 | ); | |
118 | $helper->mk_app( '.' ) or fail; | |
119 | ||
120 | my $server_script_new = do { | |
121 | open(my $fh, '<', $server_script_file) or fail $!; | |
122 | local $/; | |
123 | <$fh>; | |
124 | }; | |
125 | ||
126 | is $server_script, $server_script_new; | |
127 | ||
128 | diag "Installed app is in $instdir"; | |
129 | command_ok( [ ($Config{make} || 'make', 'install') ] ); | |
130 | ||
131 | my $inst_app_dir = File::Spec->catdir($instdir); | |
132 | chdir($inst_app_dir) or die "Cannot chdir to $inst_app_dir: $!"; | |
133 | lib->import(File::Spec->catdir($instdir, 'lib', 'perl5')); | |
134 | ||
135 | my @installed_files = qw| | |
136 | lib/perl5/TestApp.pm | |
137 | lib/perl5/TestApp/testapp.conf | |
138 | lib/perl5/TestApp/Controller/Root.pm | |
139 | lib/perl5/TestApp/root/static/images/catalyst_logo.png | |
140 | lib/perl5/TestApp/root/static/images/btn_120x50_built.png | |
141 | lib/perl5/TestApp/root/static/images/btn_120x50_built_shadow.png | |
142 | lib/perl5/TestApp/root/static/images/btn_120x50_powered.png | |
143 | lib/perl5/TestApp/root/static/images/btn_120x50_powered_shadow.png | |
144 | lib/perl5/TestApp/root/static/images/btn_88x31_built.png | |
145 | lib/perl5/TestApp/root/static/images/btn_88x31_built_shadow.png | |
146 | lib/perl5/TestApp/root/static/images/btn_88x31_powered.png | |
147 | lib/perl5/TestApp/root/static/images/btn_88x31_powered_shadow.png | |
148 | lib/perl5/TestApp/root/favicon.ico | |
149 | bin/testapp_cgi.pl | |
150 | bin/testapp_fastcgi.pl | |
151 | bin/testapp_server.pl | |
152 | bin/testapp_test.pl | |
153 | bin/testapp_create.pl | |
154 | |; | |
155 | ||
156 | foreach my $fn (map { File::Spec->catdir(@$_) } map { [ File::Spec::Unix->splitdir($_) ] } @installed_files) { | |
157 | my $ffn = File::Spec->catfile($inst_app_dir, $fn); | |
158 | ok -r $ffn, "'$fn' installed in correct location"; | |
159 | } | |
96 | 160 | |
97 | 161 | chdir('/'); |
98 | 162 | done_testing; |
0 | use strict; | |
1 | use warnings; | |
2 | ||
3 | use FindBin qw/$Bin/; | |
4 | use File::Spec; | |
5 | use File::Find::Rule; | |
6 | use Module::Info; | |
7 | ||
8 | use Test::More; | |
9 | ||
10 | my %versions; | |
11 | for my $pm_file ( File::Find::Rule->file->name( qr/\.pm$/ )->in(File::Spec->catdir($Bin, '..', 'lib') ) ) { | |
12 | my $mod = Module::Info->new_from_file($pm_file); | |
13 | ||
14 | ( my $stripped_file = $pm_file ) =~ s{.*lib/}{}; | |
15 | ||
16 | $versions{$stripped_file} = $mod->version; | |
17 | } | |
18 | ||
19 | my $ver = delete $versions{'Catalyst/Devel.pm'}; | |
20 | ok $ver; | |
21 | ok scalar(keys %versions); | |
22 | ||
23 | for my $module ( sort keys %versions ) { | |
24 | next unless $versions{$module}; | |
25 | ||
26 | is( $versions{$module}, $ver, | |
27 | "version for $module is the same as in Catalyst/Devel.pm" ); | |
28 | } | |
29 | ||
30 | done_testing; | |
31 |