diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-21 06:06:44 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 2000-03-21 06:06:44 +0000 |
commit | cc507455df60f06ecd74b2df5a0ae9f17fb3291d (patch) | |
tree | 5f131231aae2e4f8465cd9aa6647185d789c82fc /pp_ctl.c | |
parent | 90430aa1bf5124b92f92cfc6b13f379955a95711 (diff) | |
download | perl-cc507455df60f06ecd74b2df5a0ae9f17fb3291d.tar.gz |
make parenthetic warnings look consistent; make diagnostic on
"use 5.6" et al mention the alternate form; pod fixups
p4raw-id: //depot/perl@5851
Diffstat (limited to 'pp_ctl.c')
-rw-r--r-- | pp_ctl.c | 19 |
1 files changed, 15 insertions, 4 deletions
@@ -2937,7 +2937,7 @@ PP(pp_require) || (PERL_VERSION == ver && PERL_SUBVERSION < sver)))) { - DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only version " + DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only " "v%d.%d.%d, stopped", rev, ver, sver, PERL_REVISION, PERL_VERSION, PERL_SUBVERSION); } @@ -2954,9 +2954,20 @@ PP(pp_require) NV nsver = (nver - ver) * 1000; UV sver = (UV)(nsver + 0.0009); - DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--this is only version " - "v%d.%d.%d, stopped", rev, ver, sver, PERL_REVISION, - PERL_VERSION, PERL_SUBVERSION); + /* help out with the "use 5.6" confusion */ + if (sver == 0 && (rev > 5 || (rev == 5 && ver >= 100))) { + DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--" + "this is only v%d.%d.%d, stopped" + " (did you mean v%"UVuf".%"UVuf".0?)", + rev, ver, sver, PERL_REVISION, PERL_VERSION, + PERL_SUBVERSION, rev, ver/100); + } + else { + DIE(aTHX_ "Perl v%"UVuf".%"UVuf".%"UVuf" required--" + "this is only v%d.%d.%d, stopped", + rev, ver, sver, PERL_REVISION, PERL_VERSION, + PERL_SUBVERSION); + } } } RETPUSHYES; |