Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in filter function #44

Closed
aagouda opened this issue Sep 23, 2015 · 1 comment
Closed

Error in filter function #44

aagouda opened this issue Sep 23, 2015 · 1 comment

Comments

@aagouda
Copy link

aagouda commented Sep 23, 2015

The filter function emits error if there is a text node, this code not working:

use v5.12;
use Web::Query;
use Data::Dumper;
my $wq = wq('<div class="foo"><p class="foo">bar</p></div>Standalone Text'); # needed because we don't have a global document like jQuery does
print $wq->filter('.foo')->add($wq->find('.foo'))->as_html; # <div class="foo"><p class="foo">bar</p></div><p class="foo">bar</p>

The error is:

Can't locate object method "matches" via package "HTML::TreeBuilder::XPath::TextNode" at /site/lib/Web/Query.pm line 340.

Thanks for the new version also.

@yanick
Copy link
Collaborator

yanick commented Sep 23, 2015

Problem found and patched. New version coming real soon on CPAN. Thanks!

@yanick yanick closed this as completed in 43eb2aa Sep 23, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants