[Israel.pm] Error in compilations - not found

Shlomi Fish shlomif at shlomifish.org
Sun Oct 28 05:03:30 PDT 2012


Hi Chanan,
On Sun, 28 Oct 2012 13:17:08 +0200
Chanan Berler <bc.other at gmail.com> wrote:

> Example of syntax bareword error (or like):
> note the "aaaa" i have added...using perl -c DAL.pl no error is found,
> however if I use aaaa; error found :(
> 

I believe that's because "aaaa" is interpreted as a function or method call.
You'll get an error in run-time, which as Sawyer notes, should be catchable
using automated tests (which are a good idea for other reasons, see:
http://www.shlomifish.org/lecture/Perl/Newbies/lecture5/testing/
).

Regards,

	Shlomi Fish

> package DAL;
> 
> ## $Revision: 1.7 $
> ## $Date: 2012/07/16 14:36:13 $
> ## $Author: sergiy $
> 
> use base 'backoffice::dal';
> use strict;
> use warnings;
> 
> our $VERSION = '2.03';
> 
> sub new
> {
> 	my ( $class, $params ) = @_;
> 
>         aaaa
> 
> 	# for compatible
> 	$params->{'config'} = $params->{'Config'}->{'DB'}->{'OFFICE'};
> 
> 	return $class->SUPER::new($params);
> }
> 
> 1;
> 
-- 
-----------------------------------------------------------------
Shlomi Fish       http://www.shlomifish.org/
Optimising Code for Speed - http://shlom.in/optimise

<rindolf>  If you repeat a scene 50k times, then the movie will have less
entropy and will compress better. ( irc://irc.freenode.org/#perlcafe )

Please reply to list if it's a mailing list post - http://shlom.in/reply .


More information about the Perl mailing list