This queue is for tickets about the HTML-Zoom CPAN distribution.

Report information
The Basics
Id:
84575
Status:
new
Priority:
Low/Low
Queue:

People
Owner:
Nobody in particular
Requestors:
lxp [...] cpan.org
Cc:
AdminCc:

BugTracker
Severity:
(no value)
Broken in:
0.009007
Fixed in:
(no value)



Subject: prepend_content in HTML::Zoom::FilterBuilder not accepting scalar refs
The documentation for prepend_content in HTML::Zoom::FilterBuilder states that "acceptable values are strings, scalar refs and HTML::Zoom objects." It gives the following example using a string:
Show quoted text
> HTML::Zoom > ->from_html(q[<p>World</p>]) > ->select('p') > ->prepend_content("Hello ") > ->to_html > > ## expected/actual: <p>Hello World</p>
If I'm reading the documentation correctly, it should be possible to achieve the same result if "Hello " is replaced with \"Hello " but the same result is not achieved:
Show quoted text
> HTML::Zoom > ->from_html(q[<p>World</p>]) > ->select('p') > ->prepend_content(\"Hello ") > ->to_html > > ## expected: <p>Hello World</p> > ## actual: <p>World</p>
Specifically, I'm trying to replace_content but not have that content escaped:
Show quoted text
> HTML::Zoom > ->from_html('<span>...</span>') > ->select('span') > ->replace_content(\'&minus;123.45') > ->to_html > > ## expected: <span>&minus;123.45</span> > ## actual: <span></span>
The docs don't explicitly permit use of scalar refs in replace_content; is this meant to be possible? If so, this issue extends to that method as well.


This service runs on Request Tracker, is sponsored by The Perl Foundation, and maintained by Best Practical Solutions.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.