happy-barney

ideas - package / versions

Oct 19th, 2020
368
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1.  
  2. package Foo v1.0.0 {
  3. }
  4.  
  5. package Foo v2.0.0 {
  6. extends Foo v1.0.0;
  7. }
  8.  
  9. use alias Foo::Old => Foo v1.0.0;
  10. use alias Foo::New => Foo v2.0.0;
  11.  
  12. Foo<v1.0.0>->new;
  13. Foo<v2.0.0>->new;
  14.  
  15. if ($var isa Foo::Old) ...
  16. if ($var isa Foo<v1.0.0>) ...
  17.  
  18. # XML inspiration
  19. package Bar provides "http://foo.bar/..." {
  20. }
Add Comment
Please, Sign In to add comment