Hi Shlomi, I already know this is run-time error found...thought maybe there is a better way to catch these kinda errors before run-time, as I am using system find command and run perl -c on all project modules (which miserably fails to catch these syntax errors).
Following your state of mind, i need to use CHECK block creating instances of all objects in modules - which in my case is impossible due to time and project size. I wonder why aaaa; failes while aaaa doesn't Thanks again Chanan On Sun, Oct 28, 2012 at 2:03 PM, Shlomi Fish <[email protected]> wrote: > Hi Chanan, > On Sun, 28 Oct 2012 13:17:08 +0200 > Chanan Berler <[email protected]> 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 . > _______________________________________________ > Perl mailing list > [email protected] > http://mail.perl.org.il/mailman/listinfo/perl -- =================== ---- Chanan Berler ---- =================== _______________________________________________ Perl mailing list [email protected] http://mail.perl.org.il/mailman/listinfo/perl
