Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: how to split large pl file

by ask (Pilgrim)
on Nov 21, 2001 at 07:19 UTC ( [id://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 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 ;)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others contemplating the Monastery: (4)
As of 2024-04-25 12:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found