| |
| |
| |
|
Page: 1 2
Comments:
<0> hello everyone <1> yo <0> hey <0> boring room <0> :-)\ <2> hey <2> anyone u for giving a lil *approach* advice, as oppsed to the usual "how do I use this sub?" **** <2> I can just ask outright, cuz it'll take a bit of explanation first <3> just ask <3> explain as little as is necessary <2> ok <2> here is my problem, or confict <2> this is for, yes, again IRC (I now everyones sick of IRC stuff, lol) <2> btu ya see.. <2> this is difficult to explain <2> its totally modular..
<2> IO::DCC, IO::Normal, Tools::Channel, etc etc <2> the idea here is.. <2> if DCC support isn't needed <2> it dont have to be loaded.. <2> or <2> thats what I wanna accomplish <2> theres a million ways I've found to approach this <2> but theres so many aspects t IRC that I cant seem to find method that will work with component of IRC <2> well, I have.. but they dont please me.. venture into the hckish sides of things <2> if channel management isnt needed, the Tools::Channel would ideally be able to not be loaded <2> andthe rest function as it normally would without <2> the problem yes.. um <2> any suggestions as to where to start, maybe an IRC::Kernel sorta thing to manage these modules? <2> or, anyone for a got a better suggestion, worse one.. just a thought <2> anything <2> would be much appreciated <2> octothorpe, I tried to explain as lil as necessary <2> but it didn't work out that way <2> lol <2> is a complex thing to explain <3> i'm not familiar with any of these modules <2> yea of course <2> as I've written them all <2> none if it comes from CPAN etc <3> ahh <3> is it an architecture problem you're having? <2> yes <2> I'm hving trouble trying to decide how to piece them together <3> ok, so what's the problem? you want them to be loaded dynamically? <2> and, leave each as indepent <2> yea <3> you could use AUTOLOADER to detect when functions that aren't loaded yet are called <2> I can do that with a simple sub that accepts the namespaces, and loops through em loads which is needed <2> never used autoloader <2> will look into it <3> when somewhat calls a sub that doesn't exist, sub AUTOLOAD gets called instead <2> any other sugggestions while y still here, so I dont gotta bother ya later <2> I'll start reading once we're done <2> OH <3> you provide an AUTOLOAD sub that figures out which module needs to be loaded for the requested function, then load it and call it yourself <2> I ws thinkin module for some reason <2> you mean <2> AUTOLOAD { } <2> i see now <2> ok <3> maybe your base module can initialize AUTOLOADers for the other modules <3> that would be lightweight <2> how would I go about that? <2> Ijust.. <2> uh make a list of the modules internally <3> will there be one top-level module the user will load? <3> yeah <2> loop throught them <2> umm <2> top level, s in *core* module? <3> yeah <2> yea <2> register them with it <2> and have it mnage them <2> nd call the autoloads? <2> excuse my typing its **** this morning
<3> when you load that, put an autoloader in each other module's namespace. the autoloader should load the module (replacing itself with an autoloader that simply dies "no such function") and call the requested function <3> make sense? <2> hmm <2> maybe <2> are you saing soemthing like <3> then, when your user goes to call something in Tools::Channels (or a sub in your base module does so), Tools::Channels's autoloader will load Tools::Channels <2> AUTOLOAD { eval "use ". __PACKAGE__; } <3> i think you'll need to require(), i'm not certain <2> but, thats the concept you're getting at? <3> yes <2> ok <3> __PACKAGE__::AUTOLOAD { eval "use ". __PACKAGE__; } <2> h <2> perl will know where to look? <3> no, i think you might have to set them up manually in the appropriate namespaces <2> those namespaces dontexist unless previously loaded will they? and if they dun exist to begin with, ho could I expect to call the AUTOLOAD method in a namespace that dun exist? <2> ok <3> i think every namespace has its own AUTOLOAD <2> I think I follow ya pretty well <2> yea, does <3> man, it's been a long time since i've touched AUTOLOAD. i made a per-function autoloader for my old company <2> yea me as well <2> and well <3> it wound up being faster to load whole files at a time though - more caching <2> I am getting damn good with perl these days, is just.. well experience yanno <2> I lack a bit in that area <3> :) <2> but I understand the language, and how to use it very well... <2> there always alot more to learn <3> there's plenty to learn in the area of software design even after you've mastered perl ;) <2> of cours <2> I've a decent background prgramming <2> perl thoguh <2> I just recently picked up <2> I adore this language above all <3> yes. i'm spoiled <4> naaah, it doesn't have enough power-swearwords. <3> i've been so frustrated learning c++ <2> hey octothorpe <3> yep? <2> how about this, it being OO.. <2> I run into coplications tracking objects fro namespace to namespace <2> exports from each one seems a bit absurd to me <2> complications* <3> i haven't done much OO in perl :( <2> ah <2> eh <2> thanks alot for the help <3> no worries <2> and ya have been quite help <2> and ya have been quite a help <4> what complications ? <2> well <2> see <2> this ned to be as extensible as possibe <2> addon modules <2> etc <2> OH <2> I got it <2> I'll do the code i OO <2> then all the expansion tools, in a more traditinal manner <2> er <2> code=core <3> for future reference, work of phrasing your questions for a while before posing them. often you can answer your own questions, and at the least you'll get more readers with a concise question <3> i phrase mine in my text editor :) <2> eh <2> I see the advantage that offers already <2> heh <2> will do eh, thaks again <3> :) <3> i used to get in trouble for asking my old boss stuff and answering my own questions <4> it's really common that you see the slution when you ask the question. <3> i'm glad he thought it was comical <2> www.severed.org/pics/Bryan/Bryan5.jpg <- thats me twat
Return to
#perl or Go to some related
logs:
#india #india #kl #php #kl Is Malt-O-Meal ok for dogs to eat? #chat-world #allnitecafe useradd with homedir ubuntu #india
|
|