In perl.git, the branch smoke-me/jkeenan/132732-if has been updated

<https://perl5.git.perl.org/perl.git/commitdiff/e202bfb954217349f5e61bddbb92ba10021ea242?hp=2243f770492a3b37b4a0c7822fc1980ce176252f>

  discards  2243f770492a3b37b4a0c7822fc1980ce176252f (commit)
- Log -----------------------------------------------------------------
commit e202bfb954217349f5e61bddbb92ba10021ea242
Author: James E Keenan <[email protected]>
Date:   Tue Jan 23 10:46:32 2018 -0500

    'if' module:  clarify documentation and test more thoroughly.
    
    The documentation for 'if' made certain claims about the need to quote or 
not
    quote a module name preceding a "fat arrow" ('=>') operator.  These claims
    were shown to be unfounded in most cases when "use strict 'subs'" was in
    effect.
    
    In the course of writing better documentation, it was observed that the "no
    if" case was very under-tested, poorly documented and hence poorly 
understood.
    Hence, more tests have been added and the documentation has been extensively
    revised.  However, there have been no changes in source code or 
functionality.
    
    Make porting/podcheck.t happy.  Compensate for functions not available on
    older perls.
    
    For:  RT # 132732.

-----------------------------------------------------------------------

Summary of changes:
 dist/if/t/if.t | 23 ++++++++++++++---------
 1 file changed, 14 insertions(+), 9 deletions(-)

diff --git a/dist/if/t/if.t b/dist/if/t/if.t
index 6fc113e623..827d93cbcb 100644
--- a/dist/if/t/if.t
+++ b/dist/if/t/if.t
@@ -46,15 +46,20 @@ unless (eval 'use open ":std"; 1') {
     use strict "subs";
 
     {
-        note(q|strict "subs" : 'use if' : condition false|);
-        eval "use if (0 > 1), q|bigrat|, qw(hex oct);";
-        ok (! main->can('hex'), "Cannot call bigrat::hex() in importing 
package");
-        ok (! main->can('oct'), "Cannot call bigrat::oct() in importing 
package");
-
-        note(q|strict "subs" : 'use if' : condition true|);
-        eval "use if (1 > 0), q|bigrat|, qw(hex oct);";
-        ok (  main->can('hex'), "Can call bigrat::hex() in importing package");
-        ok (  main->can('oct'), "Can call bigrat::oct() in importing package");
+        SKIP: {
+            unless ($] >= 5.018) {
+                skip "bigrat apparently not testable prior to perl-5.18", 4;
+            }
+            note(q|strict "subs" : 'use if' : condition false|);
+            eval "use if (0 > 1), q|bigrat|, qw(hex oct);";
+            ok (! main->can('hex'), "Cannot call bigrat::hex() in importing 
package");
+            ok (! main->can('oct'), "Cannot call bigrat::oct() in importing 
package");
+
+            note(q|strict "subs" : 'use if' : condition true|);
+            eval "use if (1 > 0), q|bigrat|, qw(hex oct);";
+            ok (  main->can('hex'), "Can call bigrat::hex() in importing 
package");
+            ok (  main->can('oct'), "Can call bigrat::oct() in importing 
package");
+        }
     }
 
     {

-- 
Perl5 Master Repository

Reply via email to