| 1 | package Linux::Event::Framer::U32BE; | ||||||||||
| 2 | 7 | ▶ | use v5.36; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 3 | 7 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 7 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | 7 | our $VERSION = '0.119'; | |||||||||
| 7 | |||||||||||
| 8 | 7 | ▶ | use Carp qw(croak); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 7 | ▶ | use Linux::Event::Framer::LengthPrefix (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | 4 | ▶ | sub _build_definition ($class, @args) { | ||||||||
|
Subroutine
_build_definition: called CC=4 SCAR=14.6
| |||||||||||
| 12 | 4 | ▶ | croak 'U32BE options must be key/value pairs' if @args % 2; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 13 | 4 | my %opt = @args; | |||||||||
| 14 | 4 | ▶ | croak 'bytes is fixed at 4 for U32BE' if exists $opt{bytes}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 15 | 4 | ▶ | croak 'endian is fixed at big for U32BE' if exists $opt{endian}; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 16 | 4 | return Linux::Event::Framer::LengthPrefix->_build_definition( | |||||||||
| 17 | %opt, bytes => 4, endian => 'big' | ||||||||||
| 18 | ); | ||||||||||
| 19 | } | ||||||||||
| 20 | |||||||||||
| 21 | 7 | 1; | |||||||||
| 22 | |||||||||||
| 23 | __END__ | ||||||||||