| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bubblegum::Role::Configuration; |
|
2
|
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
364
|
use 5.10.0; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
37
|
|
|
4
|
1
|
|
|
1
|
|
907
|
use namespace::autoclean; |
|
|
0
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use strict; |
|
7
|
|
|
|
|
|
|
use utf8::all; |
|
8
|
|
|
|
|
|
|
use warnings; |
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
use Import::Into; |
|
11
|
|
|
|
|
|
|
use Moo::Role; |
|
12
|
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
use Bubblegum::Namespace (); |
|
14
|
|
|
|
|
|
|
use feature (); |
|
15
|
|
|
|
|
|
|
use mro (); |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
use Class::Load 'load_class', 'try_load_class'; |
|
18
|
|
|
|
|
|
|
use parent 'autobox'; |
|
19
|
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
our $VERSION = '0.44'; # VERSION |
|
21
|
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
requires 'import'; |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
BEGIN { |
|
25
|
|
|
|
|
|
|
use Bubblegum::Object::Universal; # tisk tisk |
|
26
|
|
|
|
|
|
|
push @UNIVERSAL::ISA, 'Bubblegum::Object::Universal'; |
|
27
|
|
|
|
|
|
|
} |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
sub prerequisites { |
|
30
|
|
|
|
|
|
|
my ($class, $target) = @_; |
|
31
|
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
# autoload |
|
33
|
|
|
|
|
|
|
unless (my $ignore = ($target =~ /^Bubblegum::Object/)) { |
|
34
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Undef'; |
|
35
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Array'; |
|
36
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Code'; |
|
37
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Float'; |
|
38
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Hash'; |
|
39
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Instance'; |
|
40
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Integer'; |
|
41
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Number'; |
|
42
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Scalar'; |
|
43
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::String'; |
|
44
|
|
|
|
|
|
|
load_class 'Bubblegum::Object::Universal'; |
|
45
|
|
|
|
|
|
|
} |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# resolution |
|
48
|
|
|
|
|
|
|
mro::set_mro $target, 'c3'; |
|
49
|
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
# ipc handler |
|
51
|
|
|
|
|
|
|
my $ipc = try_load_class 'IPC::System::Simple'; |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
# imports |
|
54
|
|
|
|
|
|
|
'strict' ->import::into($target); |
|
55
|
|
|
|
|
|
|
'warnings' ->import::into($target); |
|
56
|
|
|
|
|
|
|
'utf8::all' ->import::into($target); |
|
57
|
|
|
|
|
|
|
'autodie' ->import::into($target, ':all') if $ipc; |
|
58
|
|
|
|
|
|
|
'autodie' ->import::into($target, ':default') if !$ipc; |
|
59
|
|
|
|
|
|
|
'feature' ->import::into($target, ':5.10'); |
|
60
|
|
|
|
|
|
|
'English' ->import::into($target, '-no_match_vars'); |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
# autoboxing |
|
63
|
|
|
|
|
|
|
no warnings 'once'; |
|
64
|
|
|
|
|
|
|
$target->autobox::import( |
|
65
|
|
|
|
|
|
|
map { $_ => $$Bubblegum::Namespace::ExtendedTypes{$_} } |
|
66
|
|
|
|
|
|
|
keys %$Bubblegum::Namespace::DefaultTypes |
|
67
|
|
|
|
|
|
|
); |
|
68
|
|
|
|
|
|
|
} |
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
1; |