http://qs321.pair.com?node_id=126718


in reply to how to split large pl file

But none seemed right, as the code I want to separate is NOT generic (ie uses globals in main, etc.)

You really need to fix that, or any "organization" is just a waste of time.

Try figuring out how you can divide up the work your program does in logical parts and then separate them out as modules.

perldoc perlmod
should be of help (Also available at perldoc.com).

 - ask

-- 
ask bjoern hansen, http://ask.netcetera.dk/   !try; do();

Replies are listed 'Best First'.
Re: Re: how to split large pl file
by smackdab (Pilgrim) on Nov 21, 2001 at 08:32 UTC
    Thanks Bjoern,

    but, I was kinda exagerating ;)

    I want to put all menu callbacks in a file and all button callbacks in another file...

      Something that's a menu callback can easily be made to be (possibly also) a button callback and vice-versa. (Not to mention pull-down menus.) This, IMO, means that these things are not inheritently different such that they should be seperated.
        I don't disagre, but I just want to keep the size my source file small. GUI programs are very verbose compared to a neat little command-line jobber...

        Seems like there is no way other than a module with its own namespace...

        Seems to me, this would be a nice addition to Perl 6, but then I am still new to Perl ;)