This patch has nothing to do with my previous message about the request
to load templates also from scalar references.
This patch just makes an insignificant clean-up of the *present*
load_tmpl() code.
0======0======0
Having a look at the C::A (Ver. 3.22) load_tmpl() method code, I've
found a couple of (possible) typos.
My corrections are really negligible, but since diff-ing is so fun, I've
made a patch the same ;-)
Here are the corrections.
1.
In the comment:
# add tmpl_path to path array of one is set, otherwise add a path arg
^^
the word "of" should be "if" (I think).
2.
The line:
push(@extra_params, path => [ $tmpl_path ]) unless $found;
wasn't properly indented (yeah, big step forward in C::A development!
:-)
3.
In the boolean expression:
$extra_params[$x] eq 'path' and
ref $extra_params[$x+1] and
ref $extra_params[$x+1] eq 'ARRAY'
the 2nd predicate is /implied/ by the 3rd, so it's unnecessary and can
be removed (redundancy often decrease legibility, it does not increase
it.)
After this change you can also get a 0.000000001% speed-up in
load_tmpl() execution.
Ciao.
--Emanuele Zeppieri.
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.