diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control.pm index 4a6681fd2..6285d5739 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control.pm @@ -61,7 +61,12 @@ sub DESTROY { sub AUTOLOAD { my $self = shift; - my $class = ref($self) || Fatal("$self not object"); + my $class = ref($self); + if ( !$class ) { + my ( $caller, undef, $line ) = caller; + Fatal("$self not object from $caller:$line"); + } + my $name = $AUTOLOAD; $name =~ s/.*://; if ( exists($self->{$name}) ) { diff --git a/scripts/ZoneMinder/lib/ZoneMinder/Control/Sony.pm b/scripts/ZoneMinder/lib/ZoneMinder/Control/Sony.pm index 25df76c99..463fddb52 100644 --- a/scripts/ZoneMinder/lib/ZoneMinder/Control/Sony.pm +++ b/scripts/ZoneMinder/lib/ZoneMinder/Control/Sony.pm @@ -32,8 +32,6 @@ require ZoneMinder::Control; our @ISA = qw(ZoneMinder::Control); -our $VERSION = $ZoneMinder::Base::VERSION; - # ========================================================================== # # Sony Network Camera Control Protocol @@ -50,7 +48,7 @@ sub open { use LWP::UserAgent; $self->{ua} = LWP::UserAgent->new; - $self->{ua}->agent( 'ZoneMinder Control Agent/'.$VERSION ); + $self->{ua}->agent('ZoneMinder Control Agent/'.$ZoneMinder::Base::VERSION); $self->{state} = 'open'; } @@ -102,10 +100,9 @@ sub moveConLeft { sub moveConRight { my $self = shift; - Debug( "Move Right" ); - - my $cmd = "/command/ptzf.cgi?Move=right,8,1"; - $self->sendCmd( $cmd ); + Debug('Move Right'); + my $cmd = '/command/ptzf.cgi?Move=right,8,1'; + $self->sendCmd($cmd); } sub moveConUpRight { @@ -206,7 +203,7 @@ sub moveRelUpLeft { my $tiltstep = $self->getParam($params, 'tiltstep'); Debug("Step Up/Left $tiltstep/$panstep"); my $cmd = '/command/ptzf.cgi?relative=0705'; - $self->sendCmd( $cmd ); + $self->sendCmd($cmd); } sub moveRelDownRight {