In perl I wanted to debug some module code, so I temporarily added the following line to such source code:
print $${${$${$$h[1]{$j}}{proxy_cache}}{$e}}{'fetch_handler'}{'ownerDocument'}
...and it prints:
CODE(0x9b2b3e0)
What "CODE" means? I expected HASH(0x???????)
. I am pretty new in Perl, so please explain me this, as goooooogling for +Perl +CODE is not helpful :)
I was looking for url
of ownerDocument
information, btw.
[UPDATE]
I am trying to use module WWW::Scripter
for my needs and I already found several bugs that author of this module (Father Chrysostomos) already fixed based on my inputs.
Now I'm "debugging" some issues with images that are created dynamically in JavaScript (for example ((new Image()).src='http://...'
), as those images are now not included in $w->images
results.
If you take a look at sub update_html
in module source [http://cpansearch.perl.org/src/SPROUT/WWW-Scripter-0.026/lib/WWW/Scripter.pm], there is a line that starts with
$h && $h->eval($self, $code ...
This is a section that I need to debug. I am trying to "search" for new images in DOM after script is evaluated. I was able to find image elements pretty easy, but now I am trying to find information to which document they belong to, as I need to get
them with correct referer
information. Some images are created within frames, iframes, scripts, etc. If incorrect referer information is used, then it may lead to incorrect response, as most of such (new Image()).src='http://...'
images are used for tracking with cookies, not for real image content. To get correct content of document, all these special images need to be properly processed and without correct referer it does not work...