|
|
|
@ -63,14 +63,14 @@ sub pin($this, $pin, $dock = undef) |
|
|
|
|
{ |
|
|
|
|
foreach my $dock (keys %$pin) |
|
|
|
|
{ |
|
|
|
|
croak "dock $dock doesn't exist" unless grep { $_ eq $dock } keys %docks; |
|
|
|
|
(carp("dock $dock doesn't exist") && return) unless grep { $_ eq $dock } keys %docks; |
|
|
|
|
$this->{pins}{$dock} = $pin->{$dock}; |
|
|
|
|
} |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
|
{ |
|
|
|
|
croak "bad pin type"; |
|
|
|
|
carp ("bad pin type") && return; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
@ -78,7 +78,7 @@ sub _do_pin($this, $pin, $dock = undef) |
|
|
|
|
{ |
|
|
|
|
if($dock) |
|
|
|
|
{ |
|
|
|
|
croak "bad dock" unless $dock =~ /^sw|se|n$/i; |
|
|
|
|
(carp("bad dock") && retrun) unless $dock =~ /^sw|se|n$/i; |
|
|
|
|
$this->{pins}{$dock} = $pin; |
|
|
|
|
} |
|
|
|
|
else |
|
|
|
@ -94,7 +94,7 @@ sub _do_pin($this, $pin, $dock = undef) |
|
|
|
|
last DOCK; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
croak "no free dock" unless $success; |
|
|
|
|
(carp("no free dock") && return) unless $success; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|