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 override

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 the

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 the course of the

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); DESCRIPTION Apache::Use will

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.: Most definitely.

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 CORE::use(@_);

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 also find

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 .pm

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 than

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 startup,

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

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 SD without affecting

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 have

RE: API Design Question

2001-06-29 Thread Joe Breeden
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 == Shawn Devlin [EMAIL PROTECTED] writes: SD My first thought is to break

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. Also, each function call

API Design Question

2001-06-28 Thread Shawn Devlin
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. My first thought is to break the API up so that there is a module per API call (there are some