[Koha-patches] [PATCH] Fixing more warnings

Chris Cormack chrisc at catalyst.net.nz
Tue May 12 12:58:01 CEST 2009


* Galen Charlton (galen.charlton at liblime.com) wrote:
> Hi Chris,
> 
> On Tue, May 12, 2009 at 3:30 AM, Chris Cormack <chris at bigballofwax.co.nz> wrote:
> > -my $content_type = ($cgi->param('format') && $cgi->param('format') =~ /rss|atom/) ? "application/xml" :
> > -                   "text/html";
> > -
> > +my $content_type;
> > +if ($cgi->param('format') && $cgi->param('format') =~ /rss|atom/ ){
> > +    $content_type = "application/xml";
> > +}
> > +else {
> > +    $content_type = "text/html";
> > +}
> 
> I'll be pushing this patch, but what's wrong with my $foo = $condition
> ? $valuea : $valueb; ?  That's a perfectly legitimate construct.
> 
Actually you are right, I was attempting to fix a merge conflict, and
picked the wrong one :) Both work, there is a follow up patch to this
that gets rid of an extra } too

Chris

-- 
Chris Cormack
Catalyst IT Ltd.
+64 4 803 2238
PO Box 11-053, Manners St, Wellington 6142, New Zealand



More information about the Koha-patches mailing list