| 1 | ## -*- Mode: CPerl -*- | ||||||||||||||||||||||||||||
| 2 | ## | ||||||||||||||||||||||||||||
| 3 | ## File: DTA::CAB::Sentence.pm | ||||||||||||||||||||||||||||
| 4 | ## Author: Bryan Jurish <moocow@cpan.org> | ||||||||||||||||||||||||||||
| 5 | ## Description: generic API for sentences passed to/from DTA::CAB::Analyzer | ||||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||||
| 7 | package DTA::CAB::Sentence; | ||||||||||||||||||||||||||||
| 8 | 1 | ▶ | use DTA::CAB::Datum; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 9 | 1 | ▶ | use Carp; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 10 | 1 | ▶ | use strict; | ||||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||||
| 12 | ##============================================================================== | ||||||||||||||||||||||||||||
| 13 | ## Globals | ||||||||||||||||||||||||||||
| 14 | ##============================================================================== | ||||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||||
| 16 | 1 | our @ISA = qw(DTA::CAB::Datum); | |||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||||
| 18 | ##============================================================================== | ||||||||||||||||||||||||||||
| 19 | ## Constructors etc. | ||||||||||||||||||||||||||||
| 20 | ##============================================================================== | ||||||||||||||||||||||||||||
| 21 | |||||||||||||||||||||||||||||
| 22 | |||||||||||||||||||||||||||||
| 23 | |||||||||||||||||||||||||||||
| 24 | ## $s = CLASS_OR_OBJ->new(\@tokens,%args) | ||||||||||||||||||||||||||||
| 25 | ## + object structure: HASH | ||||||||||||||||||||||||||||
| 26 | ## { | ||||||||||||||||||||||||||||
| 27 | ## tokens => \@tokens, ##-- DTA::CAB::Token objects | ||||||||||||||||||||||||||||
| 28 | ## ## | ||||||||||||||||||||||||||||
| 29 | ## ##-- dta-tokwrap attributes | ||||||||||||||||||||||||||||
| 30 | ## xmlid => $id, | ||||||||||||||||||||||||||||
| 31 | ## } | ||||||||||||||||||||||||||||
| 32 | 0 | ▶ | sub new { | ||||||||||||||||||||||||||
|
Subroutine
new: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||||
| 33 | 0 | ▶ | return bless({ | ||||||||||||||||||||||||||
|
Branch: 1 branch
Condition0%0/3
ref $_[0] || $_[0]
MC/DC0%0/2
ref $_[0] || $_[0]
ref $_[0]
$_[0]
Truth table0%0/3
A || B
A= ref $_[0]B= $_[0]
| |||||||||||||||||||||||||||||
| 34 | tokens => ($#_>=1 ? $_[1] : []), | ||||||||||||||||||||||||||||
| 35 | @_[2..$#_], | ||||||||||||||||||||||||||||
| 36 | }, ref($_[0])||$_[0]); | ||||||||||||||||||||||||||||
| 37 | } | ||||||||||||||||||||||||||||
| 38 | |||||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||||
| 40 | ##============================================================================== | ||||||||||||||||||||||||||||
| 41 | ## Methods: Misc | ||||||||||||||||||||||||||||
| 42 | ##============================================================================== | ||||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||||
| 44 | |||||||||||||||||||||||||||||
| 45 | |||||||||||||||||||||||||||||
| 46 | 1 | 1; ##-- be happy | |||||||||||||||||||||||||||
| 47 | |||||||||||||||||||||||||||||
| 48 | __END__ | ||||||||||||||||||||||||||||