| 1 | #!/bin/false | ||||||||||
| 2 | # ABSTRACT: Rapid Commit option (code 14) -- zero-length data | ||||||||||
| 3 | # PODNAME: Net::DHCPv6::Option::RapidCommit | ||||||||||
| 4 | 15 | ▶ | use strictures 2; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | package Net::DHCPv6::Option::RapidCommit; | ||||||||||
| 7 | 15 | $Net::DHCPv6::Option::RapidCommit::VERSION = '0.003'; | |||||||||
| 8 | 15 | ▶ | use Net::DHCPv6::OptionList (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 15 | ▶ | use Net::DHCPv6::Constants qw( | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | $OPTION_RAPID_COMMIT | ||||||||||
| 11 | 15 | ); | |||||||||
| 12 | 15 | ▶ | use Net::DHCPv6::X::BadOption (); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 13 | 15 | ▶ | use parent 'Net::DHCPv6::Option'; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 14 | 15 | ▶ | use namespace::clean; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 15 | |||||||||||
| 16 | 4 | ▶ | sub new { | ||||||||
|
Subroutine
new: called CC=1 SCAR=0.0
Pod
documented
| |||||||||||
| 17 | 4 | my ( $class, %args ) = @_; | |||||||||
| 18 | 4 | $args{code} = $OPTION_RAPID_COMMIT; | |||||||||
| 19 | 4 | my $self = $class->SUPER::new( code => $args{code} ); | |||||||||
| 20 | 4 | return bless $self, $class; | |||||||||
| 21 | } | ||||||||||
| 22 | |||||||||||
| 23 | 3 | ▶ | sub from_bytes_inner { | ||||||||
|
Subroutine
from_bytes_inner: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||
| 24 | 3 | my ( $class, $code, $payload ) = @_; | |||||||||
| 25 | 3 | ▶ | Net::DHCPv6::X::BadOption->throw( message => 'RapidCommit option must be empty' ) | ||||||||
|
Branch: 1 branch
| |||||||||||
| 26 | if CORE::length( $payload ) > 0; | ||||||||||
| 27 | 2 | return $class->new; | |||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 15 | $Net::DHCPv6::OptionList::OPTION_CLASS{$OPTION_RAPID_COMMIT} = __PACKAGE__; | |||||||||
| 31 | |||||||||||
| 32 | 15 | 1; | |||||||||
| 33 | |||||||||||
| 34 | __END__ | ||||||||||