I don't document in the code, I don't insert headers with descriptive info, and I don't put comments between the functions so that another programmer would be able to follow along with ease.
I'd like to put my stuff together, in a library of sorts, so I could get at the various functions, utilities, and snippets without too much effort, instead of 'cd'ing' around my box trying to remember what snippet was part of what application which would be where again?
Surely, others have this same problem/issue. How to best get organized? thanks.
To use it, just open your favorite file manager and create a new directory for your database called "perl snippets". Under the "snippets" directory, just create a directory as you need it. When you do that new "download a page" script, just put it in the "www" directory. When you need to find that snippet, just open you filemanager again and perform a search on the directory.
As far as I know, the "file system" method is usable on virutally all computers in use today. ;)
yes...
but using code libraries allows me to do things like:
$num = &utils::parseWebPage(&utils::urlFetch(&utils::getSerps("foo", "altavista")))
Or...work out the serp page for "foo" in Altavista, get it and count the number of items in it. $num is (with one line of code) equal to the the number of items that are ranked in Altervista for "foo".
Impresses the hell out of managers...
I was just wondering if there was any 'killer application' that I should use, with low learning curve, that would do essentially the same thing...
Now all I need to do is put them all into the same dir, label it 'snips' and call it good, I suppose. Thanks for the suggestion.
>>about the &main::jeremy idea
Good one, but until I get to be a real 'perl h@cker' I don't think I'll try anything like that, would probably take too much time to learn how to do. :) thanks for the idea, though, someday...
I've only recently found out the PM's are almost exactly the same as PL's, whwich is why their not PM's. Just habit now.
As a side note, I rarely use the template 'library' now as I tent to use SSI instead - it's easier when you want to use multiple scripts on the same page (eg. a time display (done with SSI), a counter (some of our clients still want them - so we make them pay for their stupidity *g*) and perhaps a links database, oh and a script which shows the recent threads on the forums)
Allen
It needs a little tweaking in the display department and could use a few extra features, but it is a good starting point for building a library that suits your personal needs.
Onya
Woz