line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
|
2
|
|
|
|
|
|
|
package Term::Size::Any; |
3
|
|
|
|
|
|
|
|
4
|
4
|
|
|
4
|
|
157614
|
use strict; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
183
|
|
5
|
4
|
|
|
4
|
|
144
|
use vars qw( $VERSION ); |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
885
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
$VERSION = '0.002'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub _require_any { |
10
|
3
|
|
|
3
|
|
6
|
my $package; |
11
|
|
|
|
|
|
|
|
12
|
3
|
50
|
|
|
|
15
|
if ( $^O eq 'MSWin32' ) { |
13
|
0
|
|
|
|
|
0
|
require Term::Size::Win32; |
14
|
0
|
|
|
|
|
0
|
$package = 'Term::Size::Win32'; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
} else { |
17
|
|
|
|
|
|
|
#require Best; |
18
|
|
|
|
|
|
|
#my @modules = qw( Term::Size::Perl Term::Size Term::Size::ReadKey ); |
19
|
|
|
|
|
|
|
#Best->import( @modules ); |
20
|
|
|
|
|
|
|
#$package = Best->which( @modules ); |
21
|
3
|
|
|
|
|
1880
|
require Term::Size::Perl; |
22
|
3
|
|
|
|
|
3210
|
$package = 'Term::Size::Perl'; |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
} |
25
|
3
|
|
|
|
|
252
|
$package->import( qw( chars pixels ) ); # allows Term::Size::Any::chars |
26
|
3
|
|
|
|
|
8
|
return $package; |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub import { |
30
|
3
|
|
|
3
|
|
26
|
my $self = shift; |
31
|
3
|
|
|
|
|
9
|
my $package = _require_any; |
32
|
3
|
|
|
|
|
9
|
unshift @_, $package; |
33
|
3
|
|
|
|
|
29
|
my $import_sub = $package->can('import'); |
34
|
3
|
|
|
|
|
101
|
goto &$import_sub; |
35
|
|
|
|
|
|
|
} |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
1; |