Advertisement
happy-barney

perl protocol

Mar 31st, 2021
307
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.05 KB | None | 0 0
  1. ===> Expectations
  2.  
  3. - perl v7 is declared to be perl v5.XX, one of features in bundle will be 'indirect'
  4. - with feature indirect will be default off
  5. - enabling of feature indirect will be prohibited in v8
  6.  
  7. ===> Code, running perl-5.XX, module already compatible with v7
  8.  
  9. use v7;
  10. use feature 'indirect';
  11.  
  12. # perl-5.XX knows about bundle v7 so this is legal code and use will succeed
  13. # enabling 'indirect' will raise deprecation warning
  14.  
  15. ===> Code, running perl-7, module incompatible with v7
  16.  
  17. # use v7 is default ("base protocol")
  18. use v5.XX;
  19. use feature 'indirect';
  20.  
  21. # v5.XX is known protocol to v7
  22. # enabling 'indirect' will raise deprecation warning
  23.  
  24. ==> Code, running perl-8
  25.  
  26. use v5.XX;
  27.  
  28. # compile time error, protocol cannot be enabled due 'indirect'
  29.  
  30. ==> Code, running perl-5.XX
  31.  
  32. use experimental v8; # or "use v8-preview"
  33. use feature 'indirect';
  34.  
  35. # compile time error, protocol cannot be enabled due 'indirect'
  36. # as far as it's already decided to get rid of feature 'indirect'
  37. # one can write as v8-compatible code as possible
  38.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement