diff --git a/lib/SSH/PublicKey.pm b/lib/SSH/PublicKey.pm index 23233fe..ec89d9d 100644 --- a/lib/SSH/PublicKey.pm +++ b/lib/SSH/PublicKey.pm @@ -53,9 +53,9 @@ sub restrictions { my ($self, @parts) = (shift); push @parts, sprintf('command="%s"', $self->command) if $self->command; push @parts, (map { $self->$_ ? $self->_attr_to_option($_) : () } - qw{no_pty no_port_forwarding no_X11_forwarding no_agent_forwarding}); + qw{no_pty no_port_forwarding no_X11_forwarding no_agent_forwarding}); return join ',' => @parts; -}; +} sub _attr_to_option { local $_ = $_[1] or return; @@ -68,10 +68,10 @@ sub _parse { return $self unless $self->{val}; my $RE = $self->_parse_re; if ($self->{val} =~ m/$RE/) { - $self->_restrictions($1)->type($2)->key($3)->comment($4); - chop($self->{_restrictions}) if $1; + $self->_restrictions($1)->type($2)->key($3)->comment($4); + chop($self->{_restrictions}) if $1; } else { - say STDERR "Failed to parse: ", $self->{val}; + say STDERR "Failed to parse: ", $self->{val}; } return $self; } diff --git a/t/key-db-crud-update.t b/t/key-db-crud-update.t index d4b7823..6f1f1f3 100644 --- a/t/key-db-crud-update.t +++ b/t/key-db-crud-update.t @@ -91,7 +91,7 @@ like $stderr, qr/^no command to update/m, 'failed update message'; $app = $t->app_instance(@opts); $app->key_files->map( sub { - # __PACKAGE__ needs a package definition above + # __PACKAGE__ needs a package definition above my $exp = data_section(__PACKAGE__, $_->basename); my $obs = $_->slurp; is $obs, $exp, 'content match ' . $_->basename;