1 use inc::Module::Install;
6 name 'Catalyst-Engine-Stomp';
7 all_from 'lib/Catalyst/Engine/Stomp.pm';
9 requires 'Catalyst::Engine::Embeddable' => '0.0.1';
10 requires 'Catalyst::Action::REST' => undef;
11 requires 'Catalyst::Runtime' => '5.80004';
12 requires 'Moose' => undef;
13 requires 'MooseX::Workers' => '0.05';
14 requires 'Net::Stomp' => '0.34';
15 requires 'YAML::XS' => '0.32';
16 requires 'namespace::autoclean' => '0.05';
18 test_requires 'Alien::ActiveMQ' => '0.00003';
20 no_index package => 'StompTestApp';
21 no_index package => 'StompTestApp::Controller::TestController';
23 my @force_build_requires_if_author = qw(
30 if ($Module::Install::AUTHOR) {
31 foreach my $module (@force_build_requires_if_author) {
32 build_requires $module;
34 darwin_check_no_resource_forks();
37 install_script glob('script/*.pl');
41 if ($Module::Install::AUTHOR) {
43 # Strip out the author only build_requires from META.yml
44 # Need to do this _after_ WriteAll else it looses track of them
45 strip_author_only_build_requires(@force_build_requires_if_author);
47 Meta->{values}{resources} = [
48 [ 'license', => 'http://dev.perl.org/licenses/' ],
49 [ 'repository', => 'git://github.com/chrisa/catalyst-engine-stomp.git' ],
55 sub darwin_check_no_resource_forks {
56 if ($^O eq 'darwin') {
57 my $osx_ver = `/usr/bin/sw_vers -productVersion`;
60 # TAR on 10.4 wants COPY_EXTENDED_ATTRIBUTES_DISABLE
61 # On 10.5 (Leopard) it wants COPYFILE_DISABLE
62 my $attr = $osx_ver eq '10.5' ? 'COPYFILE_DISABLE' : 'COPY_EXTENDED_ATTRIBUTES_DISABLE';
64 makemaker_args(dist => { PREOP => qq{\@if [ "\$\$$attr" != "true" ]; then}.
65 qq{ echo "You must set the ENV variable $attr to true,"; }.
66 ' echo "to avoid getting resource forks in your dist."; exit 255; fi' });
70 sub strip_author_only_build_requires {
71 my @build_requires_to_strip = @_;
72 Meta->{values}{build_requires} = [ grep {
74 foreach my $module (@build_requires_to_strip) {
75 if ($_->[0] =~ /$module/) {
81 } @{Meta->{values}{build_requires}} ];