| 1 | package Alien::Web; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # ABSTRACT: Base class/namespace static web asset distributions on CPAN | ||||||||||
| 7 | 1 | our $VERSION = 1.1; | |||||||||
| 8 | |||||||||||
| 9 | 1 | ▶ | use File::ShareDir qw(dist_dir); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | 1 | require Path::Class; | |||||||||
| 11 | |||||||||||
| 12 | 1 | ▶ | sub dir { | ||||||||
|
Subroutine
dir: called CC=3 SCAR=11.7
Pod
documented
| |||||||||||
| 13 | 1 | ▶ | my $class = shift or die "dir() must be called as a class method"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | |||||||||||
| 15 | 1 | my $dist_dir = $class->path; | |||||||||
| 16 | |||||||||||
| 17 | 1 | ▶ | $dist_dir ? Path::Class::dir($dist_dir) : undef | ||||||||
|
Branch: 1 branch
| |||||||||||
| 18 | } | ||||||||||
| 19 | |||||||||||
| 20 | |||||||||||
| 21 | 2 | ▶ | sub path { | ||||||||
|
Subroutine
path: called CC=3 SCAR=11.3
Pod
documented
| |||||||||||
| 22 | 2 | ▶ | my $class = shift or die "dir() must be called as a class method"; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 23 | |||||||||||
| 24 | 2 | ▶ | die "Alien::Web is a base class and is not meant to be called directly" | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | if($class eq 'Alien::Web'); | ||||||||||
| 26 | |||||||||||
| 27 | 2 | my $dist = $class; | |||||||||
| 28 | 2 | $dist =~ s/\:\:/\-/g; | |||||||||
| 29 | |||||||||||
| 30 | 2 | dist_dir($dist) | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 1 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||