in reply to Re: multiple "sub" packages in 1 file: possible? how?
in thread multiple "sub" packages in 1 file: possible? how?

Will have to play with the various examples you mention.

I didn't want to confuse the issue by posting code that might have other distractions in it that would detract from the concept I wished to understand. I wasn't so much interested in having a specific answer, relative to my current code, but wanted to elicit solutions to the concept that I could mull over.

The current code is just a "mash" of trying some new stuff out...experimenting...GUI usage...etc. Sorry about the syntax errors in my example -- I wasn't intending it to be code -- just a descriptive example of what I was trying to do. FYIW, my script has no temperature functionality in it. It has to do with a simple script to display images via Tk, in a shuffled or random order where each image has a numeric rating that determines its chances of being selected -- while allowing me to change the ratings of one or more images, move backwards and forwards in the "random" sequence...etc. Just a toy, really, but a good experimentation ground for better coding & design...if you know what I mean... Linda

  • Comment on Re^2: multiple "sub" packages in 1 file: possible? how?

Replies are listed 'Best First'.
Re^3: multiple "sub" packages in 1 file: possible? how?
by Beechbone (Friar) on Aug 07, 2007 at 15:16 UTC
    One more way to do it:
    package my::foo; BEGIN { $INC{'my/foo.pm'} ||= 'dev/null'; } require exporter; # etc. package main; use my::foo;
    The addition to %INC tells use/require that the package is already in memory, so it won't try to load it again.

    Search, Ask, Know