| 1 | package Astroboy; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 2 | 4 | ▶ | use strict; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 3 | 4 | ▶ | use Astroboy::AlbumFile; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 4 | 4 | ▶ | use Astroboy::AlbumDir; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 5 | 4 | ▶ | use Astroboy::Base; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 6 | 4 | ▶ | use vars qw($VERSION); $VERSION = sprintf "%d.%02d", q$Revision: 1.6 $ =~ /(\d+)/g; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 7 | 4 | ▶ | no strict 'refs'; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 8 | 4 | ▶ | use LEOCHARRE::Class2; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 9 | 4 | __PACKAGE__->make_accessor_setget('errstr'); | |||||||||||||||||||||||||||||||||||||||||||||||||
| 10 | 2 | ▶ | sub new { return __PACKAGE__ } | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 12 | 0 | ▶ | sub file { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
file: not called CC=5 SCAR=34.0
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 13 | 0 | my ($self,$_path) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 14 | 0 | ▶ | my $abs = Cwd::abs_path($_path) or die; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 15 | 0 | ▶ | -f $abs or die; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 16 | 0 | ▶ | ($self->{file}->{$abs} ||= Astroboy::AlbumFile->new( $abs )) or die; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
$self->{"file"}{$abs} ||= "Astroboy::AlbumFile"->new($abs)
MC/DC0%0/2
$self->{"file"}{$abs} ||= "Astroboy::AlbumFile"->new($abs)
$self->{"file"}{$abs}
"Astroboy::AlbumFile"->new($abs)
Truth table0%0/3
A ||= B
A= $self->{"file"}{$abs}B= "Astroboy::AlbumFile"->new($abs)
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 17 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 18 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 19 | 0 | ▶ | sub dir { | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Subroutine
dir: not called CC=6 SCAR=37.4
Pod
undocumented
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 20 | 0 | my ($self,$_path) = @_; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 21 | 0 | ▶ | my $abs = Cwd::abs_path($_path) or die; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 22 | 0 | ▶ | -d $abs or die; | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 23 | 0 | ▶ | ($self->{dir}->{$abs} ||= Astroboy::AlbumDir->new( $abs )) | ||||||||||||||||||||||||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/8
($self->{'dir'}{$abs} ||= 'Astroboy::AlbumDir'->new($abs)) || $self->errstr('not album?') && (return)
$self->{"dir"}{$abs} ||= "Astroboy::AlbumDir"->new($abs)
$self->errstr("not album?") and return
MC/DC0%0/2
($self->{'dir'}{$abs} ||= 'Astroboy::AlbumDir'->new($abs)) || $self->errstr('not album?') && (return)
($self->{'dir'}{$abs} ||= 'Astroboy::AlbumDir'->new($abs))
$self->errstr("not album?")
MC/DC0%0/2
$self->{"dir"}{$abs} ||= "Astroboy::AlbumDir"->new($abs)
$self->{"dir"}{$abs}
"Astroboy::AlbumDir"->new($abs)
Truth table0%0/3
A || B
A= ($self->{'dir'}{$abs} ||= 'Astroboy::AlbumDir'->new($abs))B= $self->errstr("not album?")
Truth table0%0/3
A ||= B
A= $self->{"dir"}{$abs}B= "Astroboy::AlbumDir"->new($abs)
| |||||||||||||||||||||||||||||||||||||||||||||||||||
| 24 | or $self->errstr("not album?") | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 25 | and return; | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 26 | } | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 27 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 28 | # make this a singleton | ||||||||||||||||||||||||||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 30 | 4 | 1; | |||||||||||||||||||||||||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||||||||||||||||||||||||||
| 32 | __END__ | ||||||||||||||||||||||||||||||||||||||||||||||||||