[dw-free] hush warnings in AtomAPI.pm
[commit: http://hg.dwscoalition.org/dw-free/rev/95a601bcc9a4]
http://bugs.dwscoalition.org/show_bug.cgi?id=3353
A few less warnings.
Patch by
kareila.
Files modified:
http://bugs.dwscoalition.org/show_bug.cgi?id=3353
A few less warnings.
Patch by
![[personal profile]](https://www.dreamwidth.org/img/silk/identity/user.png)
Files modified:
- cgi-bin/Apache/LiveJournal/Interface/AtomAPI.pm
-------------------------------------------------------------------------------- diff -r 0429c47708e3 -r 95a601bcc9a4 cgi-bin/Apache/LiveJournal/Interface/AtomAPI.pm --- a/cgi-bin/Apache/LiveJournal/Interface/AtomAPI.pm Tue Dec 28 21:24:15 2010 +0800 +++ b/cgi-bin/Apache/LiveJournal/Interface/AtomAPI.pm Tue Dec 28 22:29:34 2010 +0800 @@ -165,7 +165,7 @@ sub handle_post { my $security_opts = { security => 'public' }; # TODO Add code for handling this with XML::Atom::ext - if ($XML::Atom::Version <= .13) { + if ( ! $XML::Atom::Version || ( $XML::Atom::Version <= .13 ) ) { eval { foreach my $allow_element (map { XML::Atom::Util::nodelist($_, 'http://www.sixapart.com/ns/atom/privacy', 'allow') } XML::Atom::Util::nodelist($entry->{doc}, 'http://www.sixapart.com/ns/atom/privacy', 'privacy')) { @@ -197,8 +197,8 @@ sub handle_post { } } - my $preformatted = $entry->get - ("http://sixapart.com/atom/post#", "convertLineBreaks") eq 'false' ? 1 : 0; + my $clb = $entry->get( "http://sixapart.com/atom/post#", "convertLineBreaks" ); + my $preformatted = ( $clb && $clb eq 'false' ) ? 1 : 0; # build a post event request. my $req = { --------------------------------------------------------------------------------