lib/validate.pl Perl library supporting wholesale file mode validation
lib/vars.pm Declare pseudo-imported global variables
lib/vars.t See if "use vars" work
+lib/vmsish.pm Control VMS-specific behavior of Perl core
+lib/vmsish.t Tests for vmsish.pm
lib/warnings.pm For "use warnings"
lib/warnings.t See if warning controls work
lib/warnings/register.pm For "use warnings::register"
vms/ext/Stdio/Stdio.pm VMS options to stdio routines
vms/ext/Stdio/Stdio.xs VMS options to stdio routines
vms/ext/Stdio/test.pl regression tests for VMS::Stdio
-vms/ext/vmsish.pm Control VMS-specific behavior of Perl core
-vms/ext/vmsish.t Tests for vmsish.pm
vms/ext/XSSymSet.pm manage linker symbols when building extensions
vms/genconfig.pl retcon config.sh from config.h
vms/genopt.com hack to write options files in case of broken makes
assumed. Currently, there are four VMS-specific features available:
'status' (a.k.a '$?'), 'exit', 'time' and 'hushed'.
+If you're not running VMS, this module does nothing.
+
=over 6
=item C<vmsish status>
=cut
-if ($^O ne 'VMS') {
- require Carp;
- Carp::croak("This isn't VMS");
-}
+my $IsVMS = $^O eq 'VMS';
sub bits {
my $bits = 0;
}
sub import {
+ return unless $IsVMS;
+
shift;
$^H |= bits(@_ ? @_ : qw(status time));
my $sememe;
}
sub unimport {
+ return unless $IsVMS;
+
shift;
$^H &= ~ bits(@_ ? @_ : qw(status time));
my $sememe;
+#!./perl
-BEGIN { unshift @INC, '[-.lib]'; }
+BEGIN {
+ chdir 't' if -d 't';
+ @INC = '../lib';
+}
my $Invoke_Perl = qq(MCR $^X "-I[-.lib]");
-require "test.pl";
-plan(tests => 24);
+require "./test.pl";
+plan(tests => 25);
+
+SKIP: {
+ skip("tests for non-VMS only", 1) if $^O eq 'VMS';
+
+ BEGIN { $Orig_Bits = $^H }
+
+ # make sure that all those 'use vmsish' calls didn't do anything.
+ is( $Orig_Bits, $^H, 'use vmsish a no-op' );
+}
+
+SKIP: {
+ skip("tests for VMS only", 24) unless $^O eq 'VMS';
#========== vmsish status ==========
`$Invoke_Perl -e 1`; # Avoid system() from a pipe from harness. Mutter.
ok($vmsmtime - $utcmtime + $offset <= 10,"(stat) UTC: $utcmtime VMS: $vmsmtime");
}
+}
#====== need this to make sure error messages come out, even if
# they were turned off in invoking procedure
.endif
# Modules which must be installed before we can build extensions
-LIBPREREQ = $(ARCHDIR)Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm [.lib]XSLoader.pm [.lib]lib.pm [.lib]vmsish.pm [.lib.ExtUtils]XSSymSet.pm $(ARCHDIR)vmspipe.com [.lib]re.pm
+LIBPREREQ = $(ARCHDIR)Config.pm [.lib.VMS]Filespec.pm [.lib]DynaLoader.pm [.lib]XSLoader.pm [.lib]lib.pm [.lib.ExtUtils]XSSymSet.pm $(ARCHDIR)vmspipe.com [.lib]re.pm
utils1 = [.lib.pod]perldoc.com [.lib.ExtUtils]Miniperl.pm [.utils]c2ph.com [.utils]h2ph.com [.utils]h2xs.com [.lib]perlbug.com [.lib]perlcc.com [.utils]dprofpp.com
utils2 = [.utils]perlivp.com [.lib]splain.com [.utils]pl2pm.com
dynext : $(LIBPREREQ) $(DBG)perlshr$(E) preplibrary
@make_ext "$(MINIPERL_EXE)" "$(MMS)"
-[.lib]vmsish.pm : [.vms.ext]vmsish.pm
- Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
-
[.lib]lib.pm : [.lib]lib_pm.PL
$(MINIPERL) $(MMS$SOURCE)
[.t.lib]vmsfspec.t : [.vms.ext]filespec.t
Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
-[.t.lib]vmsish.t : [.vms.ext]vmsish.t
- Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
-
[.t.lib]vms_dclsym.t : [.vms.ext.DCLsym]test.pl
Copy/Log/NoConfirm $(MMS$SOURCE) $(MMS$TARGET)
check : test
@ Continue
-test : all [.t.lib]vmsfspec.t [.t.lib]vmsish.t [.t.lib]vms_dclsym.t [.t.lib]vms_stdio.t
+test : all [.t.lib]vmsfspec.t [.t.lib]vms_dclsym.t [.t.lib]vms_stdio.t
- @[.VMS]Test.Com "$(E)" "$(__DEBUG__)"
@ $(MINIPERL) -e "print ""Ran tests"";" > [.t]rantests.