| line | stmt | bran | cond | sub | pod | time | code | 
| 1 |  |  |  |  |  |  | package NewFangle::Segment 0.0901 { | 
| 2 |  |  |  |  |  |  |  | 
| 3 | 6 |  |  | 6 |  | 34 | use strict; | 
|  | 6 |  |  |  |  | 9 |  | 
|  | 6 |  |  |  |  | 173 |  | 
| 4 | 6 |  |  | 6 |  | 25 | use warnings; | 
|  | 6 |  |  |  |  | 12 |  | 
|  | 6 |  |  |  |  | 110 |  | 
| 5 | 6 |  |  | 6 |  | 67 | use 5.014; | 
|  | 6 |  |  |  |  | 18 |  | 
| 6 | 6 |  |  | 6 |  | 26 | use NewFangle::FFI; | 
|  | 6 |  |  |  |  | 10 |  | 
|  | 6 |  |  |  |  | 399 |  | 
| 7 | 6 |  |  | 6 |  | 36 | use Carp (); | 
|  | 6 |  |  |  |  | 12 |  | 
|  | 6 |  |  |  |  | 1250 |  | 
| 8 |  |  |  |  |  |  |  | 
| 9 |  |  |  |  |  |  | # ABSTRACT: NewRelic segment class | 
| 10 |  |  |  |  |  |  |  | 
| 11 |  |  |  |  |  |  |  | 
| 12 | 0 |  |  | 0 | 1 |  | sub transaction { shift->{txn} } | 
| 13 |  |  |  |  |  |  |  | 
| 14 |  |  |  |  |  |  |  | 
| 15 |  |  |  |  |  |  | $ffi->attach( [ end_segment => 'end' ] => ['newrelic_txn_t', 'opaque*'] => 'bool' => sub { | 
| 16 |  |  |  |  |  |  | my($xsub, $self) = @_; | 
| 17 |  |  |  |  |  |  | my $txn = $self->{txn}; | 
| 18 |  |  |  |  |  |  | $xsub->($self->{txn}, \$self->{ptr}); | 
| 19 |  |  |  |  |  |  | }); | 
| 20 |  |  |  |  |  |  |  | 
| 21 |  |  |  |  |  |  |  | 
| 22 |  |  |  |  |  |  | $ffi->attach( [ set_segment_parent      => 'set_parent'      ] => [ 'newrelic_segment_t', 'newrelic_segment_t' ] => 'bool' ); | 
| 23 |  |  |  |  |  |  | $ffi->attach( [ set_segment_parent_root => 'set_parent_root' ] => [ 'newrelic_segment_t'                       ] => 'bool' ); | 
| 24 |  |  |  |  |  |  | $ffi->attach( [ set_segment_timing      => 'set_timing'      ] => [ 'newrelic_segment_t', 'newrelic_time_us_t', | 
| 25 |  |  |  |  |  |  | 'newrelic_time_us_t'                       ] => 'bool' ); | 
| 26 |  |  |  |  |  |  |  | 
| 27 |  |  |  |  |  |  | sub DESTROY | 
| 28 |  |  |  |  |  |  | { | 
| 29 | 0 |  |  | 0 |  |  | my($self) = @_; | 
| 30 | 0 | 0 |  |  |  |  | $self->end if defined $self->{ptr}; | 
| 31 |  |  |  |  |  |  | } | 
| 32 |  |  |  |  |  |  |  | 
| 33 |  |  |  |  |  |  | }; | 
| 34 |  |  |  |  |  |  |  | 
| 35 |  |  |  |  |  |  | 1; | 
| 36 |  |  |  |  |  |  |  | 
| 37 |  |  |  |  |  |  | __END__ |