Skip Menu |

This queue is for tickets about the CSS-Tiny-Style CPAN distribution.

Report information
The Basics
Id: 98363
Status: new
Priority: 0/
Queue: CSS-Tiny-Style

People
Owner: Nobody in particular
Requestors: rvandam [...] bluehost.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: All 'lineage' type styles fail to match because HTML::Element->lineage returns an array, not arrayref
Date: Wed, 27 Aug 2014 11:56:22 -0600
To: bug-CSS-Tiny-Style [...] rt.cpan.org
From: Robert Dam <rvandam [...] bluehost.com>
Here's the patch I'm using, seems to work with my tests. Also, fixed the second example in the pod to reference the correct method name 'add_to'. --- lib/CSS/Tiny/Style.pm 2007-01-24 12:40:05.000000000 -0700 +++ lib/CSS/Tiny/Style.pm 2014-08-27 11:43:45.024752851 -0600 @@ -181,7 +181,7 @@ if ($self->element_match($_, $sel)) { # if element matches, check his relatives if ($rel) { - my $rellist = $_->$rel; + my $rellist = [$_->$rel]; $match = $self->match($rellist, @sel) } else { $match = 1; @@ -366,7 +366,7 @@ for my $el ($tree->descendants) { for my $st ($css->styles) { if ($st->match($el)) { - $st->add_style($el); + $st->add_to($el); } } }