Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-10 Thread James G Smith
Doug MacEachern <[EMAIL PROTECTED]> wrote: >On Tue, 3 Jul 2001, James G Smith wrote: > >> The current code I have uses %INC, but I wanted to write >> something like the following: >> >> sub use : immediate { >> # do stuff here if logging >> return CORE::use(@_); >> } > >you could just overri

Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-09 Thread Doug MacEachern
On Tue, 3 Jul 2001, James G Smith wrote: > The current code I have uses %INC, but I wanted to write > something like the following: > > sub use : immediate { > # do stuff here if logging > return CORE::use(@_); > } you could just override CORE::GLOBAL::require. you don't need to override

Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-03 Thread Robin Berjon
On Tuesday 03 July 2001 16:46, darren chamberlain wrote: > James G Smith <[EMAIL PROTECTED]> said something to this effect: > > The current code I have uses %INC, but I wanted to write > > something like the following: > > > > sub use : immediate { > > # do stuff here if logging > > return COR

Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-03 Thread darren chamberlain
James G Smith <[EMAIL PROTECTED]> said something to this effect on 07/03/2001: > darren chamberlain <[EMAIL PROTECTED]> wrote: > > James G Smith <[EMAIL PROTECTED]> said something to this effect on 07/02/2001: > > > Apache::Use > > > > You can get this information from %INC, can't you? e.g.: > >

Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-03 Thread James G Smith
darren chamberlain <[EMAIL PROTECTED]> wrote: >James G Smith <[EMAIL PROTECTED]> said something to this effect on 07/02/2001: >> How would something like this do: >> >> NAME >> >> Apache::Use >> >> SYNOPSIS >> >> use Apache::Use (Logger => DB, File => "/www/apache/logs/modules"); >> >> DESCRI

Re: RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-03 Thread darren chamberlain
James G Smith <[EMAIL PROTECTED]> said something to this effect on 07/02/2001: > How would something like this do: > > NAME > > Apache::Use > > SYNOPSIS > > use Apache::Use (Logger => DB, File => "/www/apache/logs/modules"); > > DESCRIPTION > > Apache::Use will record the modules used over t

RFC: Logging used Perl Modules (was Re: API Design Question)

2001-07-02 Thread James G Smith
How would something like this do: NAME Apache::Use SYNOPSIS use Apache::Use (Logger => DB, File => "/www/apache/logs/modules"); DESCRIPTION Apache::Use will record the modules used over the course of the Perl interpreter's lifetime. If the logging module is able, the old logs are read and

Re: API Design Question

2001-07-01 Thread Stas Bekman
On Sat, 30 Jun 2001, Steven Lembark wrote: > > > > Note that if they do get called this will end up using more memory than if > > you had just loaded them during startup, since they won't be shared between > > child processes. > > Original assumption is that they are called infrequently. You'll

Re: API Design Question

2001-06-30 Thread Steven Lembark
> Note that if they do get called this will end up using more memory than if > you had just loaded them during startup, since they won't be shared between > child processes. Original assumption is that they are called infrequently. You'll also find that the amount of memory sucked up by a sin

Re: API Design Question

2001-06-30 Thread Perrin Harkins
> The minimal-module approach can be managed nicely via Autosplit, which > puts eash sub in its own module with a stub AUTOLOAD that snags things > into core only when they are called Note that if they do get called this will end up using more memory than if you had just loaded them during startu

Re: API Design Question

2001-06-30 Thread Steven Lembark
>> memory used by the various .pm files that will be loaded numerous >> times. I can see that grouping functions based on functionality would >> reduce the number of .pm files in memory. However, if I go that route, use only loads the .pm once. Multiple uses don't eat up any more resource th

Re: API Design Question

2001-06-30 Thread Martin Redington
On Friday, June 29, 2001, at 07:25 , Shawn Devlin wrote: > What advantages do I gain by grouping the functions based on > functionality? As per my response to Mr. Worrall, one of my concerns > with placing each function call into its own module is the amount of > memory used by the various .p

Re: API Design Question

2001-06-29 Thread Per Einar
- Original Message - From: "Shawn Devlin" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Friday, June 29, 2001 8:18 PM Subject: Re: API Design Question > What I like about this is I can add a new function without needing to > disturb the existing code.

RE: API Design Question

2001-06-29 Thread Joe Breeden
. Good Luck Joe Breeden > -Original Message- > From: Shawn Devlin [mailto:[EMAIL PROTECTED]] > Sent: Friday, June 29, 2001 1:18 PM > To: [EMAIL PROTECTED] > Subject: Re: API Design Question > > > Adam Worrall wrote: > > >>>>>>"SD" == Shaw

Re: API Design Question

2001-06-29 Thread Shawn Devlin
James G Smith wrote: [snip] >>My first thought is to break the API up so that there is a module per >>API call (there are some 70 calls in the API). My reasoning is that I >>can modify existing calls and add new ones without affecting everything >>else. Does this make sense or is it better to

Re: API Design Question

2001-06-29 Thread Shawn Devlin
Adam Worrall wrote: >>"SD" == Shawn Devlin <[EMAIL PROTECTED]> writes: >> > >SD> My first thought is to break the API up so that there is a >SD> module per API call (there are some 70 calls in the API). My >SD> reasoning is that I can modify existing calls and add new ones >

Re: API Design Question

2001-06-28 Thread James G Smith
Shawn Devlin <[EMAIL PROTECTED]> wrote: >Hello all, > >I have an CGI based HTTP API (in Perl) to a database and I am now going >to port to mod_perl. I am new to this kind of programming and I have a >couple of questions. The platform is Linux. First thing to keep in mind is that CGI and mod_per