Commit | Line | Data |
3fea05b9 |
1 | package Module::Install::Scripts; |
2 | |
3 | use strict 'vars'; |
4 | use Module::Install::Base (); |
5 | |
6 | use vars qw{$VERSION @ISA $ISCORE}; |
7 | BEGIN { |
8 | $VERSION = '0.91'; |
9 | @ISA = 'Module::Install::Base'; |
10 | $ISCORE = 1; |
11 | } |
12 | |
13 | sub install_script { |
14 | my $self = shift; |
15 | my $args = $self->makemaker_args; |
16 | my $exe = $args->{EXE_FILES} ||= []; |
17 | foreach ( @_ ) { |
18 | if ( -f $_ ) { |
19 | push @$exe, $_; |
20 | } elsif ( -d 'script' and -f "script/$_" ) { |
21 | push @$exe, "script/$_"; |
22 | } else { |
23 | die("Cannot find script '$_'"); |
24 | } |
25 | } |
26 | } |
27 | |
28 | 1; |