Subject: | Cryptic Error Message |
Clearly there is something wrong in my code, but this error doesn't help me determine at all what is wrong. Here's the error message:
$text is undefined in XML::RSS::_encode(). We don't know how to handle it! at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 97.
XML::RSS::Private::Output::Base::_default_encode(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0), undef) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 90
XML::RSS::Private::Output::Base::_encode(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0), undef) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 139
XML::RSS::Private::Output::Base::_out_tag(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0), "description", undef) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 248
XML::RSS::Private::Output::Base::_out_inner_tag(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0), "textinput", "description") called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 271
XML::RSS::Private::Output::Base::_output_multiple_tags(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0), "textinput", ARRAY(0x565130541080)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 280
XML::RSS::Private::Output::Base::_output_common_textinput_sub_elements(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 313
XML::RSS::Private::Output::Base::_output_complete_textinput(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 1088
XML::RSS::Private::Output::Base::_output_main_elements(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 1097
XML::RSS::Private::Output::Base::_out_last_elements(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/V2_0.pm line 80
XML::RSS::Private::Output::V2_0::_output_rss_middle(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS/Private/Output/Base.pm line 1180
XML::RSS::Private::Output::Base::_render_complete_rss_output(XML::RSS::Private::Output::V2_0=HASH(0x5651303d9ec0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 488
XML::RSS::_render_complete_rss_output(XML::RSS=HASH(0x56512d5c49b0), 2.0) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 504
XML::RSS::as_rss_2_0(XML::RSS=HASH(0x56512d5c49b0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 568
XML::RSS::__ANON__() called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 557
XML::RSS::_output_env(XML::RSS=HASH(0x56512d5c49b0), CODE(0x56513055f228)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 569
XML::RSS::as_string(XML::RSS=HASH(0x56512d5c49b0)) called at /home/njh/perl5/perlbrew/perls/perl-5.26.0/lib/site_perl/5.26.0/XML/RSS.pm line 1371
XML::RSS::save(XML::RSS=HASH(0x56512d5c49b0), "../brass-band.xml") called at ./facebookevents line 216
And here's my code:
$rss = XML::RSS->new(version => '2.0');
$rss->channel(
title => 'The Brass Band Portal',
link => 'https://www.bandsman.co.uk',
description => 'News service for brass bands',
);
$rss->image(
title => 'The Brass Band Portal',
link => 'https://www.bandsman.co.uk',
url => 'https://www.bandsman.co.uk/images/brass.gif',
);
$rss->add_item(
title => $event->{name} . ' concert/event',
link => 'https://www.bandsman.co.uk/cgi-bin/events/db.pl?uid=default&db=events&ID=' . $event->{id} . '&view_records=View+Records',
description => $event->{name},
);
$rss->textinput(
title => 'search brass band sites',
name => 'query',
link => 'https://www.bandsman.co.uk/cgi-bin/page.fcgi?page=search',
);
$rss->save('../brass-band.xml');