I'm ignoring the prototype in this usage because Perl liked it a little better this way. (I put it on while debugging, as I was finding all my typing errors.) Most of my usuages don't ignore it. (I'm still undecided if I like prototypes for this type of case or not.) You do have a point: I can drop the '&' now that I've found all the other typos that were causing me trouble.
I could put it in an module instead of main: But I'd still need it in main and in this scope. I do not want to require external modules (besides the standard) if at all possible: This is for wide distribution within the organization, and I want to have as little barriers as possible to it getting used. (We'll have enough trouble as it is: I expect some of the departments don't even have Perl on their machines...) It needs to look like a simple script to anyone installing and running it.
Are you saying the easiest way to do this is to create an 'output' package and import it into both main and State::Object?
In reply to Re^2: Mixing procedural and OO code, one file.
by DStaal
in thread Mixing procedural and OO code, one file.
by DStaal
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |