| 1 | package perl5i::latest; | ||
| 2 | |||
| 3 | 106 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 4 | 106 | ▶ | use perl5i::VERSION; our $VERSION = perl5i::VERSION->VERSION; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | |||
| 6 | 106 | my $Latest; | |
| 7 | 106 | ▶ | BEGIN { $Latest = perl5i::VERSION->latest; } |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 8 | |||
| 9 | 106 | ▶ | use parent ($Latest); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 10 | 112 | ▶ | sub import { goto &{$Latest .'::import'} } |
|
Subroutine
import: called CC=1 SCAR=0.0
| |||
| 11 | |||
| 12 | 106 | 1; | |
| 13 | |||
| 14 | __END__ | ||
| 15 | |||
| 16 | =encoding utf8 | ||
| 17 | |||
| 18 | =head1 NAME | ||
| 19 | |||
| 20 | perl5i::latest - Use the latest version of perl5i | ||
| 21 | |||
| 22 | =head1 SYNOPSIS | ||
| 23 | |||
| 24 | use perl5i::latest; | ||
| 25 | |||
| 26 | =head1 DESCRIPTION | ||
| 27 | |||
| 28 | Because perl5i is designed to break compatibility, you must declare | ||
| 29 | which major version you're writing your code with to preserve | ||
| 30 | compatibility. If you want to be more daring, you can C<use | ||
| 31 | perl5i::latest> and it will load the newest major version of perl5i | ||
| 32 | you have installed. | ||
| 33 | |||
| 34 | perl5i B<WILL BREAK COMPATIBILITY>, believe it. This is mostly useful | ||
| 35 | for one-off scripts and one-liners and digital thrill seekers. | ||
| 36 | |||
| 37 | =cut | ||