| 1 | ########################################### | ||||||||||
| 2 | package Net::SSH::AuthorizedKey; | ||||||||||
| 3 | ########################################### | ||||||||||
| 4 | 12 | ▶ | use strict; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | 12 | ▶ | use warnings; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 6 | 12 | ▶ | use Log::Log4perl qw(:easy); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 7 | |||||||||||
| 8 | 12 | ▶ | use Net::SSH::AuthorizedKey::SSH1; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 9 | 12 | ▶ | use Net::SSH::AuthorizedKey::SSH2; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 10 | |||||||||||
| 11 | ########################################### | ||||||||||
| 12 | 69 | ▶ | sub parse { | ||||||||
|
Subroutine
parse: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||
| 13 | ########################################### | ||||||||||
| 14 | 69 | my($class, $string) = @_; | |||||||||
| 15 | |||||||||||
| 16 | 69 | my @subclasses = qw( | |||||||||
| 17 | Net::SSH::AuthorizedKey::SSH1 | ||||||||||
| 18 | Net::SSH::AuthorizedKey::SSH2 | ||||||||||
| 19 | ); | ||||||||||
| 20 | |||||||||||
| 21 | 69 | for my $subclass ( @subclasses ) { | |||||||||
| 22 | 122 | DEBUG "Parsing with $subclass: $string"; | |||||||||
| 23 | 122 | my $pk = $subclass->parse( $string ); | |||||||||
| 24 | 122 | ▶ | if($pk) { | ||||||||
|
Branch: 1 branch
| |||||||||||
| 25 | 48 | DEBUG "Successfully parsed $subclass key"; | |||||||||
| 26 | 48 | return $pk; | |||||||||
| 27 | } | ||||||||||
| 28 | } | ||||||||||
| 29 | |||||||||||
| 30 | 21 | return undef; | |||||||||
| 31 | } | ||||||||||
| 32 | |||||||||||
| 33 | 12 | 1; | |||||||||
| 34 | |||||||||||
| 35 | __END__ | ||||||||||