Loading ...
Sorry, an error occurred while loading the content.

Re: Bug in XML-FeedPP 0.16 in get function

Expand Messages
  • Kawasaki Yusuke
    javiermm, Thank you for sending your patch. I d like to announce XML::FeedPP version 0.17 is released and the bug was fixed.
    Message 1 of 1 , Dec 15, 2006
    View Source
    • 0 Attachment
      javiermm,

      Thank you for sending your patch.
      I'd like to announce XML::FeedPP version 0.17 is released and the bug was fixed.
      http://www.kawa.net/works/perl/feedpp/feedpp-e.html

      Thank you.

      -- Kawasaki Yusuke

      On 12/15/06, javiermm wrote:
      > Hi,
      > I'm using XML-FeedPP, i think is great and the easiest to manage feeds.
      >
      > I'm trying acces a attribute of item tag:
      >
      > <item rdf:about="lalala">...
      >
      > In doc, you said:
      >
      > > $item->set( '@attr' => $value );
      > > This code sets the value of the item's attribute: <item attr="$value">
      >
      > but if i use:
      > $item->get('@rdf:about');
      > i get nothing.
      >
      > I take debugger inside XML:FeedPP: and i see:
      >
      > in package XML::FeedPP::Element
      > in sub set
      > [...]
      > my ( $tagname, $attr ) = split( /\@/, $key, 2 );
      > if ( $tagname eq "" && defined $attr ) {
      > $node->{ '-' . $attr } = $val;
      > }
      > elsif (defined $attr) {
      > [...]
      >
      > but in sub get...
      > [...]
      > my ( $tagname, $attr ) = split( /\@/, $key, 2 );
      > return unless ref $node;
      > return unless exists $node->{$tagname};
      > if ( defined $attr ) {
      > [...]
      >
      > i think last return is a bug. It must be something like:
      > if ( $tagname eq "" && defined $attr) {
      > return unless exists $node->{ '-' . $attr };
      > return $node->{ '-' . $attr };
      > }
      > elsif ( defined $attr ) {
      > [...]
      >
      > yours, javier m mora (jamarier)
    Your message has been successfully submitted and would be delivered to recipients shortly.