1 package Module::Build::Platform::VMS;
4 use Module::Build::Base;
7 @ISA = qw(Module::Build::Base);
13 Module::Build::Platform::VMS - Builder class for VMS platforms
17 This module inherits from C<Module::Build::Base> and alters a few
18 minor details of its functionality. Please see L<Module::Build> for
21 =head2 Overridden Methods
27 Change $self->{build_script} to 'Build.com' so @Build works.
33 my $self = $class->SUPER::new(@_);
35 $self->{properties}{build_script} = 'Build.com';
43 '@Build foo' on VMS will not preserve the case of 'foo'. Rather than forcing
44 people to write '@Build "foo"' we'll dispatch case-insensitively.
50 my($action, $args) = $self->SUPER::cull_args(@_);
51 my @possible_actions = grep { lc $_ eq lc $action } $self->known_actions;
53 die "Ambiguous action '$action'. Could be one of @possible_actions"
54 if @possible_actions > 1;
56 return ($possible_actions[0], $args);
60 =item manpage_separator
62 Use '__' instead of '::'.
66 sub manpage_separator {
73 Prefixify taking into account VMS' filepath syntax.
77 # Translated from ExtUtils::MM_VMS::prefixify()
79 my($self, $path, $sprefix, $type) = @_;
80 my $rprefix = $self->prefix;
82 $self->log_verbose(" prefixify $path from $sprefix to $rprefix\n");
84 # Translate $(PERLPREFIX) to a real path.
85 $rprefix = $self->eliminate_macros($rprefix);
86 $rprefix = VMS::Filespec::vmspath($rprefix) if $rprefix;
87 $sprefix = VMS::Filespec::vmspath($sprefix) if $sprefix;
89 $self->log_verbose(" rprefix translated to $rprefix\n".
90 " sprefix translated to $sprefix\n");
92 if( length $path == 0 ) {
93 $self->log_verbose(" no path to prefixify.\n")
95 elsif( !File::Spec->file_name_is_absolute($path) ) {
96 $self->log_verbose(" path is relative, not prefixifying.\n");
98 elsif( $sprefix eq $rprefix ) {
99 $self->log_verbose(" no new prefix.\n");
102 my($path_vol, $path_dirs) = File::Spec->splitpath( $path );
103 my $vms_prefix = $self->config->{vms_prefix};
104 if( $path_vol eq $vms_prefix.':' ) {
105 $self->log_verbose(" $vms_prefix: seen\n");
107 $path_dirs =~ s{^\[}{\[.} unless $path_dirs =~ m{^\[\.};
108 $path = $self->_catprefix($rprefix, $path_dirs);
111 $self->log_verbose(" cannot prefixify.\n");
112 return $self->prefix_relpaths($self->installdirs, $type);
116 $self->log_verbose(" now $path\n");
126 Michael G Schwern <schwern@pobox.com>, Ken Williams <ken@cpan.org>
130 perl(1), Module::Build(3), ExtUtils::MakeMaker(3)