| 1 | package App::PerlShell::Plugin::TextTable; | ||||||||||
| 2 | |||||||||||
| 3 | ######################################################## | ||||||||||
| 4 | # AUTHOR = Michael Vincent | ||||||||||
| 5 | # www.VinsWorld.com | ||||||||||
| 6 | ######################################################## | ||||||||||
| 7 | |||||||||||
| 8 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | ▶ | use Pod::Usage; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 11 | 1 | ▶ | use Pod::Find qw( pod_where ); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 12 | |||||||||||
| 13 | 0 | ▶ | eval "use Text::Table"; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=1.2
| |||||||||||
| 14 | 1 | ▶ | if ($@) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 1 | print "Text::Table required.\n"; | |||||||||
| 16 | 1 | return 1; | |||||||||
| 17 | } | ||||||||||
| 18 | 0 | eval "use Array::Transpose"; | |||||||||
| 19 | 0 | ▶ | if ($@) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 20 | 0 | print "Array::Transpose required.\n"; | |||||||||
| 21 | 0 | return 1; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 1 | ▶ | use Exporter; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 25 | |||||||||||
| 26 | 0 | our @EXPORT = qw( | |||||||||
| 27 | TextTable | ||||||||||
| 28 | texttable | ||||||||||
| 29 | rows | ||||||||||
| 30 | cols | ||||||||||
| 31 | ); | ||||||||||
| 32 | |||||||||||
| 33 | 0 | our @ISA = qw ( Text::Table Exporter ); | |||||||||
| 34 | |||||||||||
| 35 | 0 | ▶ | sub TextTable { | ||||||||
|
Subroutine
TextTable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 36 | 0 | pod2usage( | |||||||||
| 37 | -verbose => 2, | ||||||||||
| 38 | -exitval => "NOEXIT", | ||||||||||
| 39 | -input => pod_where( {-inc => 1}, __PACKAGE__ ) | ||||||||||
| 40 | ); | ||||||||||
| 41 | } | ||||||||||
| 42 | |||||||||||
| 43 | ######################################################## | ||||||||||
| 44 | |||||||||||
| 45 | 0 | ▶ | sub texttable { | ||||||||
|
Subroutine
texttable: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 46 | 0 | my $table = Text::Table->new(@_); | |||||||||
| 47 | 0 | return bless $table, __PACKAGE__; | |||||||||
| 48 | } | ||||||||||
| 49 | |||||||||||
| 50 | 0 | ▶ | sub rows { | ||||||||
|
Subroutine
rows: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 51 | 0 | my ( $self, @arg ) = @_; | |||||||||
| 52 | 0 | return $self->load(@arg); | |||||||||
| 53 | } | ||||||||||
| 54 | |||||||||||
| 55 | 0 | ▶ | sub cols { | ||||||||
|
Subroutine
cols: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||
| 56 | 0 | my ( $self, @arg ) = @_; | |||||||||
| 57 | 0 | return $self->load( transpose( \@arg ) ); | |||||||||
| 58 | } | ||||||||||
| 59 | |||||||||||
| 60 | 0 | 1; | |||||||||
| 61 | |||||||||||
| 62 | __END__ | ||||||||||