It seems the issue is dependent on how the call-back reference is obtained while registering the perl-sub. Insterestly, the callback mechanism works fine in only ONE of the callbacks I've defined and used. In several others callbacks, I get an error similar to the above post, or a "not a CODE ref" error. I cannot yet decipher what is different between how I get the references to the other subs..
They are use the "\&modname::subname" syntax & a few variants like storing the reference in a scalar and passing it later to the registration subroutine.
Note: I edited out specific strings/literals in the output below to anonymize.
SV = RV(0xae2f0ec) at 0xae2f0e0
REFCNT = 1
FLAGS = (PADMY,ROK)
RV = 0xae2c0b8
SV = PVCV(0xae0c270) at 0xae2c0b8
REFCNT = 2
FLAGS = ()
COMP_STASH = 0xa1b1d30 "module-name"
START = 0xa3324d0 ===> 0
ROOT = 0xa3afcf0
GVGV::GV = 0xae2f140 "module-name" :: "subname"
FILE = "lib//module-name.pm"
DEPTH = 0
FLAGS = 0x0
OUTSIDE_SEQ = 8538
PADLIST = 0xae2c3f8
PADNAME = 0xae2c418(0xa458a78) PAD = 0xae2c438(0xa6337a8)
1. 0xae2c458<1> (8538,8561) "$event"
2. 0xae2c498<1> (8538,8561) "$pdata"
6. 0xae2c558<1> (8539,8561) "@details"
<...several other rows, one each for what seems to be a local/my varia
+ble in the subroutine...>
OUTSIDE = 0xa19fe18 (UNIQUE)
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.