Yes, I gave PlxHml.pm the package name PlxHml, and removed the "use Plx;" statement. x_log is indeed defined in Plx.
I thought I had been told that exporting into main made the resource available to all modules, but I guess I misinterpreted what I heard. So I just added the use statements back into each module. Plx now uses PlxHml and PlxLang, PlxHml now uses Plx and PlxLang, and PlxLang now uses Plx and PlxHml. All scripts include all 3 "use" statements.
Now I'm getting
c:\()hml.pl
Undefined subroutine &PlxHml::x_log called at C:/Perl64/site/lib/PlxHm
+l.pm line 50.
Compilation failed in require at C:/Perl64/site/lib/Plx.pm line 128.
BEGIN failed--compilation aborted at C:/Perl64/site/lib/Plx.pm line 12
+8.
Compilation failed in require at C:\!dh\DH\COM\SRC\hml.pl line 206.
BEGIN failed--compilation aborted at C:\!dh\DH\COM\SRC\hml.pl line 206
+.
Line 50 of PlxHml.pm is
x_log("\n($PM_PLXHML)");
Line 128 of Plx.pm is
use PlxHml;
And line 206 of hml.pl is
use Plx;
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.