Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: how to split large pl file

by ask (Pilgrim)
on Nov 21, 2001 at 07:19 UTC ( #126718=note: print w/replies, xml ) Need Help??

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

 - ask

ask bjoern hansen,   !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 ;)

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://126718]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (3)
As of 2022-01-16 11:30 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (49 votes). Check out past polls.