Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
The "main" program then uses those messages in subroutine calls such aspackage foo; ... our $enqmsg = pack ("C*", 0x01, 0x55, 0x22 ...);
Since many of these messages are used only once, I receive a great number of warnings about them only being used once. Is there something "suboptimal" about the way that I have structured this ? Or should I simply define an "extraneous"printmsg ($foo::enqmsg, ...);
at the top of the program to force a second reference ? Is there anything that can be done in the defining package so as not to burden "users" of the package ? Thanks, Scott.@msglist=($foo::enqmsg,...);
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Avoiding "only one reference" warnings
by BrowserUk (Patriarch) on Oct 15, 2003 at 01:14 UTC | |
|
Re: Avoiding "only one reference" warnings
by pzbagel (Chaplain) on Oct 15, 2003 at 00:28 UTC |