| 1 | package ExtUtils::Builder::Binary; | ||||||||||
| 2 | 4 | $ExtUtils::Builder::Binary::VERSION = '0.038'; | |||||||||
| 3 | 4 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 4 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 4 | ▶ | use Carp qw//; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | 4 | ▶ | use ExtUtils::Builder::Util qw/function/; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 8 | |||||||||||
| 9 | 4 | my %allowed_types = map { ($_ => 1) } qw/shared-library static-library loadable-object executable/; | |||||||||
| 10 | |||||||||||
| 11 | 15 | ▶ | sub _init { | ||||||||
|
Subroutine
_init: called CC=3 SCAR=11.3
| |||||||||||
| 12 | 15 | my ($self, %args) = @_; | |||||||||
| 13 | 15 | ▶ | my $type = $args{type} or Carp::croak('No type given'); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 14 | 15 | ▶ | $allowed_types{$type} or Carp::croak("$type is not an allowed linkage type"); | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 15 | $self->{type} = $type; | |||||||||
| 16 | 15 | return; | |||||||||
| 17 | } | ||||||||||
| 18 | |||||||||||
| 19 | 29 | ▶ | sub type { | ||||||||
|
Subroutine
type: called CC=1 SCAR=0.0
Pod
undocumented
| |||||||||||
| 20 | 29 | my $self = shift; | |||||||||
| 21 | 29 | return $self->{type}; | |||||||||
| 22 | } | ||||||||||
| 23 | |||||||||||
| 24 | 0 | ▶ | sub _mkdir_for { | ||||||||
|
Subroutine
_mkdir_for: not called CC=1 SCAR=6.9
| |||||||||||
| 25 | 0 | my ($self, $file) = @_; | |||||||||
| 26 | 0 | my $dirname = File::Basename::dirname($file); | |||||||||
| 27 | 0 | return function( | |||||||||
| 28 | module => 'File::Path', | ||||||||||
| 29 | function => 'make_path', | ||||||||||
| 30 | exports => 'explicit', | ||||||||||
| 31 | arguments => [ $dirname ], | ||||||||||
| 32 | message => "mkdir $dirname", | ||||||||||
| 33 | ); | ||||||||||
| 34 | } | ||||||||||
| 35 | 4 | 1; | |||||||||
| 36 | |||||||||||
| 37 | # ABSTRACT: Helper role for classes producing binary objects | ||||||||||
| 38 | |||||||||||
| 39 | __END__ | ||||||||||