diff options
-rw-r--r-- | perl.c | 8 | ||||
-rw-r--r-- | t/run/switches.t | 4 |
2 files changed, 8 insertions, 4 deletions
@@ -3222,9 +3222,11 @@ Perl_moreswitches(pTHX_ const char *s) } #endif PerlIO_printf(PerlIO_stdout(), - "\nThis is perl, %"SVf - " built for " ARCHNAME, - level); + "\nThis is perl " STRINGIFY(PERL_REVISION) + ", version " STRINGIFY(PERL_VERSION) + ", subversion " STRINGIFY(PERL_SUBVERSION) + " (%"SVf") built for " ARCHNAME, level + ); SvREFCNT_dec(level); } #else /* DGUX */ diff --git a/t/run/switches.t b/t/run/switches.t index 8e076d4595..20cb77297a 100644 --- a/t/run/switches.t +++ b/t/run/switches.t @@ -267,8 +267,10 @@ SWTESTPM # there are definitely known build configs where this test will fail # DG/UX comes to mind. Maybe we should remove these special cases? my $v = sprintf "%vd", $^V; + my $ver = $Config{PERL_VERSION}; + my $rel = $Config{PERL_SUBVERSION}; like( runperl( switches => ['-v'] ), - qr/This is perl, v\Q$v\E(?:[-*\w]+| \([^)]+\))? built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s, + qr/This is perl 5, version \Q$ver\E, subversion \Q$rel\E \(v\Q$v\E(?:[-*\w]+| \([^)]+\))?\) built for \Q$Config{archname}\E.+Copyright.+Larry Wall.+Artistic License.+GNU General Public License/s, '-v looks okay' ); } |