I can glean the package we are in from the tracing output in the first code-section where it is showing program output.

First a func in main is called, then package URL::Fetchable's new then URL::Cacheable's new (they used to all be called new, but I didn't trust the right ones would get called so they pretty much all have per-package names, the debug output still says 'new'... as that is there essential function..)..Then it calls URL::new -- though the pointer passed to it was blessed in main (which is why it says package main there)...i.e. that's the package the object is being blessed into at this point).

Each of those classes are derived from the one above it (except Parseable::new is part of main now). Once inside URL::new we see the setting of the storage path (a param passed down in the argument hash that is passed down), then we see URL::new exit. (the <URL::new), so right above it, in the call chain, is URL::Cacheable, where this 'action' takes place.

There output from P (like printf, but does a bit more -- in CPAN), shows pkg_host...(I put the (code:)(output:) tags in the output -- also the ### are added as commentary. Then comes the code pkg_host_base = ($p->host =~ m{(..mask)}[0].

Which I gather you mean that because I had the () inside the mask expression, I likely wouldn't want them on the outside as well.. yes.. you are right... I guess I'll just have to require that the host_mask include it's own set of parens...didn't want to rely on that (even though the end-audience may only end up being me...)..

I fixed that and still get the error... though I would note that the double parens would have prevented a match because the $ was inside the outer set of parens.

*Sigh* (this code used to download several objects before crashing -- (by causing a segfault in Perl), but in recoding/factoring... whole pile of code thrown up in the air, and comes down in different places...oi).

Anyway, that's statement 385...where that nested parens was... but as you probably guessed, that didn't fix it.

After that -- is just the unwind code from the error -- does a traceback from ... so you can see there as well that host_base was part of URL::Cacheable... then some unwinding in Cacheable where it was parsing it's params, then back out the top.

So it is in package Cacheable... as to why it prints out the full varname-- I'm guessing it's because it is a package variable (declared with 'our')...

I think I answered all your questions.. unfortunately, not much further along that was before 'cept for preventing a future SoPW... ;-)....so thanks for that... but my head is still hurting over the original problem...*owie*.


In reply to Re^2: strange prob--print RE& then use-says not set?? by perl-diddler
in thread strange prob--print RE& then use-says not set?? by perl-diddler

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.