| 1 | package OpenFrame; | ||||||||||||||||||
| 2 | |||||||||||||||||||
| 3 | 5 | ▶ | use strict; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 4 | 5 | ▶ | use warnings::register; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 5 | |||||||||||||||||||
| 6 | 5 | our $VERSION=3.05; | |||||||||||||||||
| 7 | |||||||||||||||||||
| 8 | 5 | %OpenFrame::DEBUG = ( | |||||||||||||||||
| 9 | ALL => 0, | ||||||||||||||||||
| 10 | ); | ||||||||||||||||||
| 11 | |||||||||||||||||||
| 12 | 5 | ▶ | use Pipeline; | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 13 | 5 | ▶ | use base qw ( Pipeline ); | ||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||
| 14 | |||||||||||||||||||
| 15 | 0 | ▶ | sub init { | ||||||||||||||||
|
Subroutine
init: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||||||||
| 16 | 0 | my $self = shift; | |||||||||||||||||
| 17 | 0 | $self->SUPER::init(); | |||||||||||||||||
| 18 | } | ||||||||||||||||||
| 19 | |||||||||||||||||||
| 20 | 1 | ▶ | sub debug_level { | ||||||||||||||||
|
Subroutine
debug_level: called CC=5 SCAR=22.5
Pod
undocumented
| |||||||||||||||||||
| 21 | 1 | my $self = shift; | |||||||||||||||||
| 22 | |||||||||||||||||||
| 23 | ## is this a set, a get, or what? | ||||||||||||||||||
| 24 | 1 | ▶ | if (@_ == 0) { | ||||||||||||||||
|
Branch: 3 branches
| |||||||||||||||||||
| 25 | ## this is a get of ALL | ||||||||||||||||||
| 26 | 0 | return $OpenFrame::DEBUG{ ALL }; | |||||||||||||||||
| 27 | } elsif (@_ == 1) { | ||||||||||||||||||
| 28 | ## this could either be a set of ALL, or a request for an individual package's | ||||||||||||||||||
| 29 | ## debug value. | ||||||||||||||||||
| 30 | 1 | ▶ | if ($_[0] =~ /\D/) { | ||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||
| 31 | ## we have non-digit characters, we are getting the value for a specific | ||||||||||||||||||
| 32 | ## package | ||||||||||||||||||
| 33 | 0 | return $OpenFrame::DEBUG{ $_[0] }; | |||||||||||||||||
| 34 | } else { | ||||||||||||||||||
| 35 | ## these are digits, we are setting ALL | ||||||||||||||||||
| 36 | 1 | $OpenFrame::DEBUG{ ALL } = $_[0] | |||||||||||||||||
| 37 | } | ||||||||||||||||||
| 38 | } elsif (@_ == 2) { | ||||||||||||||||||
| 39 | 0 | $OpenFrame::DEBUG{ shift @_ } = shift @_ ; | |||||||||||||||||
| 40 | } else { | ||||||||||||||||||
| 41 | 0 | die "invalid number of parameters to &OpenFrame::debug_level"; | |||||||||||||||||
| 42 | } | ||||||||||||||||||
| 43 | } | ||||||||||||||||||
| 44 | |||||||||||||||||||
| 45 | 5 | 1; | |||||||||||||||||
| 46 | |||||||||||||||||||
| 47 | __END__ | ||||||||||||||||||