| 1 | package Gitosis::Config::Reader; | ||||||||||||||
| 2 | 4 | ▶ | use Moose; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 3 | 4 | extends qw(Config::INI::Reader); | |||||||||||||
| 4 | |||||||||||||||
| 5 | 63 | ▶ | sub can_ignore { | ||||||||||||
|
Subroutine
can_ignore: called CC=2 SCAR=6.9
Pod
documented
| |||||||||||||||
| 6 | 63 | my ( $self, $line ) = @_; | |||||||||||||
| 7 | 63 | ▶ | return $line =~ /\A\s*(?:;|$|#)/ ? 1 : 0; # Skip comments and empty lines | ||||||||||||
|
Branch: 1 branch
| |||||||||||||||
| 8 | } | ||||||||||||||
| 9 | |||||||||||||||
| 10 | 4 | has _current_key => ( isa => 'Str', is => 'rw', ); | |||||||||||||
| 11 | |||||||||||||||
| 12 | 18 | ▶ | around parse_value_assignment => sub { | ||||||||||||
|
Subroutine
__ANON__: called CC=3 SCAR=11.2
| |||||||||||||||
| 13 | 18 | my ( $next, $self ) = splice @_, 0, 2; # pull these off @_ | |||||||||||||
| 14 | 18 | ▶ | if ( my ( $key, $value ) = $self->$next(@_) ) { | ||||||||||||
|
Branch: 2 branches
| |||||||||||||||
| 15 | 16 | $self->_current_key($key); | |||||||||||||
| 16 | 16 | return ( $key, $value ); | |||||||||||||
| 17 | } | ||||||||||||||
| 18 | elsif ( $_[0] =~ /^\s*(.+)\s*$/ ) { | ||||||||||||||
| 19 | 2 | return $self->_current_key, $1; | |||||||||||||
| 20 | } | ||||||||||||||
| 21 | 0 | return; | |||||||||||||
| 22 | 4 | }; | |||||||||||||
| 23 | |||||||||||||||
| 24 | 4 | ▶ | no Moose; | ||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||
| 25 | 4 | 1; | |||||||||||||
| 26 | __END__ | ||||||||||||||