From: Gavin Sinclair Date: 2002-09-04T15:40:17+09:00 Subject: Re: How do you manage your own library? was: RE: cgi redirect > Hi -- > > On Tue, 3 Sep 2002, Michael Campbell wrote: > >> > In Ruby, you can always add the method you want to CGI dynamically: >> ... >> >> How do you guys manage your own "enhancements" to ruby? Say you've >> got a number of "pet" definitions, redefinitions, etc. to standard >> ruby library classes; where do you put them? In separate files that >> you include later, or 1 big one, or something else? > > I know I'll sound like a broken record, at least to long-time > ruby-talk residents, if I mention Ruby Behaviors, or > [ruby-talk:14556], or any such thing :-) So I'll just say that, in the > absence of having really made Behaviors work, and probably for other > reasons, I tend to be pretty scrappy when it comes to this kind of > thing. For instance, in a recent project I wanted to make use of > Enumerable#map_with_indices, so I rewrote it for the nth time.... > Luckily Ruby makes that relatively easy :-) though it would in theory > be easier if I were more organized about packaging things, even for > private use. > I haven't followed all of this thread yet, so I apologize if I too sound like a broken record (!). In order to package things effectively, we need a damn good - and standard - way to manage packages. Now I know we have rpkg (is that what it's called?), and it seems to be rather good, not that I've used it, but it needs to become ingrained into the very nature of Ruby, like rdoc does, and so on. There's little point writing one's own packages if it's difficult to manage them. For really simple things, "difficult" means "any obstacle at all", since it's all too often easier to rewrite methods. I intend to look at rpkg real soon to see if it can help me manipulate my own lame packages. > -- > David Alan Black | Register for RubyConf 2002! Cheerio, Gavin