Re: Mixing TOMCAT and mod_perl sessions

2002-08-12 Thread Perrin Harkins
Yair Lenga wrote: The website I'm supporting is running both TOMCAT applications ('.war'), and has mod_perl scripts (all of them are registry - CGI scripts). I have the following requirements: * The user identification information must be shared between TOMCAT and mod_perl (so

Re: [Newbie Q] Cleanest way to implement one logon per user?

2002-08-02 Thread Perrin Harkins
Eric Cholet wrote: Someone recently suggested to me the following solution, based on slightly modified sessions. It involves sending a cookie that contains a new ID with each response. The server stores that ID keyed on the user's login name. The next request from the client is expected to

Re: [RFC] Apache::SessionManager

2002-08-02 Thread Perrin Harkins
Enrico Sorcinelli wrote: Apache::SessionManager creates an object session (in Header parsing phase, but not obligatorily) and make it available to all other handlers transparently by putting in pnotes. Others handlers can retrieve session directly from pnotes or by calling the simple

Re: [RFC] Apache::SessionManager

2002-08-02 Thread Perrin Harkins
Enrico Sorcinelli wrote: Some of the Apache::Auth* modules like Apache::AuthCookieURL are close, but I don't know of any that do the actual glue with Apache::Session. You might want to look at some of the existing modules and see if a merge of some kind is possible. This modules haven't

Re: [RFC] Apache::SessionManager

2002-08-02 Thread Perrin Harkins
Enrico Sorcinelli wrote: Incidentally there is also a session manager module very similar to this in the Extropia modules. Sincerely, I don't know Extropia modules! You can find some documentation on them here:

Re: [Newbie Q] Cleanest way to implement one logon per user?

2002-08-01 Thread Perrin Harkins
Baljit Sethi wrote: What I want to do is limit client logons to one logon per username ie while a client has a session open, he/she cannot logon to the website from another terminal. The simplest thing to do is create a new session for the user each time he logs in and invalidate any old

Re: ANNOUNCE: Mason 1.12

2002-08-01 Thread Perrin Harkins
Dave Rolsky wrote: It can, but I'm not sure what to update it to. Frankly, I think CPAN is more at fault here given that _many_ people use CVS for this sort of stuff and this quite normal when using CVS. This is a common complaint about CPAN.pm, but it's kept this way so far because of

Re: [ANNOUNCE] Apache Hello World Benchmarks - Apache C API, HelloDB

2002-07-30 Thread Perrin Harkins
Dennis Haney wrote: The bias in the test is even a little slanted towards the JSP benchmarks since the trivial connection pooling I used there is nothing like the Apache::DBI overhead in the mod_perl test, when I could have just used a persistent global $dbh instead. ( maybe I should? ) I

Re: [ANNOUNCE] Apache Hello World Benchmarks - Apache C API, HelloDB

2002-07-30 Thread Perrin Harkins
Josh Chamas wrote: My only problem with Apache::DBI for a benchmark is its default ping of the db per connect(). Oh, you're right I wasn't thinking about that. It is important in a benchmark to be testing equivalent functionality as much as possible, although it's very difficult to do. I

Re: Apache-print Timed Out

2002-07-18 Thread Perrin Harkins
David Wheeler wrote: Why should Apache-print ever time out? One reason could be a web client that disconnects. There could also be a dropped network connection or one that's too slow. I think you can adjust this behavior with the TimeOut directive in httpd.conf. I didn't even know that

Re: [ANNOUNCE] Petal 0.1

2002-07-17 Thread Perrin Harkins
Rob Nagler wrote: Apologies to those who are tired of the *ML vs. Perl debate. I think you're confusing the issue. You're not talking about in-line Perl vs. templating languages, but rather templating vs. a whole different concept. Jean-Michel clearly wants to use HTML-based templates, and

Re: Apache::Registry and Apache::PerlRun

2002-07-16 Thread Perrin Harkins
Boex,Matthew W. wrote: can i have both Registry and PerlRun running in the same environment? i have my cgi scripts running under Apache::Registry in one directory, and want to run a legacy cgi script under PerlRun in another directory. is this possible? Yes, no problem at all. - Perrin

Re: Purify, Perl and mod_perl

2002-07-16 Thread Perrin Harkins
Carwheel, Dan wrote: although their web page says only works for C, C++, Java and a few others, I've seen this page: http://www.perlpod.com/stable/perlhack.html on getting Perl work with with Purify. That page is about getting Perl's C executable to work with Purify, not using

Re: sql-relay

2002-07-15 Thread Perrin Harkins
Richard Clarke wrote: I came across http://www.firstworks.com/sqlrelay.html the other day. Have any of you come across this product before. It's been discussed here before (see the archives) but no one has talked about any real experience with it yet. Try it out and tell us what you

Re: TIPool / multiple database connections

2002-07-15 Thread Perrin Harkins
Elizabeth Mattijsen wrote: Hmm... but you won't be able to fetch the $dbh from the thread. It can only live in _that_ thread. You cannot pass objects between threads. But you _can_ send queries to that thread, fetch a jobid for that job and then obtain whatever was returned as a Perl

Re: sql-relay

2002-07-15 Thread Perrin Harkins
Richard Clarke wrote: I mean in the case of the database crashing and being able to switch to a replicated backup system. That's trivial to implement if it happens during connect time. You can simply keep a list of databases to try, and if one fails you go on to the next. This approach

Re: Propogating Errors / E-Toys

2002-07-10 Thread Perrin Harkins
Matt Sergeant wrote: On Wed, 10 Jul 2002, Fran Fabrizio wrote: Just to confirm, the end result of Matt's slide presentation was that Error.pm was good, and you should use it, but you should not use the try/catch syntax, or at the bare minimum only catch in your outermost handler. Is that

Re: Growing Server Size modperl-2.0 on Solaris 2.7

2002-07-10 Thread Perrin Harkins
Stas Bekman wrote: If you are talking about threaded mpms, we will need to develop new tools to restrict the size of the perl interpreters in the pool. I was thinking about that too. Are there hooks for causing an interpreter to exit? Is it safe to simply call CORE::exit? I'd like to

Re: Growing Server Size modperl-2.0 on Solaris 2.7

2002-07-10 Thread Perrin Harkins
Stas Bekman wrote: I think the idea was to have a special thread running whose only purpose is monitoring the pool of idle interpreters. That sounds like a better solution. I believe that we can add a Perl space hook that sets a flag that condemns an interpreter to death. The other

Re: Propogating Errors / E-Toys

2002-07-09 Thread Perrin Harkins
Michael Schout wrote: in other words, if I understand the eToys article correctly, the leaks only happen if I nest a try block inside another try block. I have experimented some, and it appears to me that this is in fact the case ($count doesnt get cleaned up if there is a nested try).

Re: Perl sections

2002-07-08 Thread Perrin Harkins
Mike Blazer wrote: MB Or may be there is some way to un-load mod_perl after Perl sections MB processing? If you need Perl sections only to do initial web server configuration and you do not need mod_perl features in runtime then instead of using Perl just write Perl script to generate Apache

Re: Understanding why this fixes my perlaccess script

2002-07-04 Thread Perrin Harkins
Jason Wilkes wrote: So far so good, and all works well. Except for one user id (actually id=333), which causes an internal server error. If I put print debugging lines in - everything works (even for user 333). If I take them out again all other users work fine except 333. Can anybody throw

Re: Propogating Errors / E-Toys

2002-06-30 Thread Perrin Harkins
Richard Clarke wrote: Using Perrin's article on E-Toys is perhaps a good place to start. In the Model object which performs various DB procedures, what actions were taken if for some reason the connection to the database failed or if an SQL error happened? Was the whole execute() block put in

Re: Propogating Errors / E-Toys

2002-06-30 Thread Perrin Harkins
F. Xavier Noria wrote: I remember the article has a comment regarding a gotcha of the Error module that causes memory leaks, but you didn't go into details there. We've actually discussed this on the list. It has to do with closures. Matt gave a presentation about exception handling which

Re: Need Porting Sanity Check

2002-06-29 Thread Perrin Harkins
Jeff wrote: Hey thanks for the reply. I am making progress but I have run into a problem where when I have PerlRun enabled my scripts are not see the field values being passed in the URL. I'm still using cgi-lib.pl not CGI.pm. I've never used cgi-lib.pl and you shouldn't either. That

Re: Need Porting Sanity Check

2002-06-29 Thread Perrin Harkins
Jeff wrote: So here is my strategy that I would like a sanity check from anyone on. Go through and quickly clean up my existing code by adding use strict and localizing all my variables (with 'my' and 'local' for special variables) and then run is under mod_Perl using the Apache::PerlRun.

Re: Any known good configuration for mod_perl DSO?

2002-06-27 Thread Perrin Harkins
Wilbur, Charlton wrote: Or am I looking at rolling my own RPMs or installing from source RPMs? My suspicion, confirmed by Mr Turner, is that this is tied directly to shared libraries and toolchains, and so I suspect further that the problem will go away if I build everything from scratch

Re: missing .al files with apache/mod_perl

2002-06-26 Thread Perrin Harkins
Allen Day wrote: Furthermore, this file doesn't exist in my filesystem. How is it possible that (1) the module works without this apparently required file at the command line but (2) doesn't work with apache/mod_perl ? How is it possible? Two ways: you could be wrong about the existence of

Re: when to mod_perl?

2002-06-25 Thread Perrin Harkins
md wrote: I was just a bit worried about the amount of static content. In the past I've had a lot more hardware to work with and I never had to worry about it much. Static content is easy; just don't serve it from mod_perl. The proxy approach is good, and so is a separate image server

Re: mod_perl memory leaks on Windows

2002-06-25 Thread Perrin Harkins
Andrey Prokopenko wrote: After a fresh restart, I started Apache/mod_perl. Then i issued a little stress test using simple perl script with LWP::Simple. I ran a performance test on /mod_perl/index.pl page for 10 minutes. The source code of that page is given below : -

Re: mod_perl memory leaks on Windows

2002-06-25 Thread Perrin Harkins
Andrey Prokopenko wrote: I tried a plain Perl cgi script, with no module used, and still the same. ;(( Do you mean that this leak cannot be fixed from Apache/mod_perl side ? I can't say for sure since I don't use mod_perl on Win32, but most of the process growth problems reported when using

Re: [ANNOUNCE] Apache::DBI 0.89

2002-06-21 Thread Perrin Harkins
Stas Bekman wrote: the threaded mpms will need a new version/mode of Apache::DBI using threads::shared, currently available only for 5.8.0-tobe, unless things will get backported to 5.6.2. Currently it seems that the threaded mpms will be safe to use only with 5.8.0, unless again things

Re: XML::Write and XML::Simple incompatibility

2002-06-20 Thread Perrin Harkins
Prakash Chatterjee wrote: Thanks people. It turned out to be an Expat problem. As advised, we compiled Apache without EXPAT - and hunky dory - it works. Sorry about that, I steered you wrong: it was a mod_perl/apache problem. I know about the Expat issue, but I didn't think either of

Re: Apache::LightBackhand

2002-06-20 Thread Perrin Harkins
Ricardo Basto wrote I'd like some feedback on this module I just wrote. It's something like a reverse proxy, but intended as a gateway from the fully-functional apache/mod_perl to another webserver, probably behind a firewall in the corporate network. That sounds just like mod_proxy's

Re: separating C from V in MVC

2002-06-18 Thread Perrin Harkins
Tony Bowden wrote: I'd have to disagree. Maybe Mike had something different in mind when he created Class::DBI, but as the current active developer on it, I'm definitely pushing it in the R-O direction. Like Dave, I always start by thinking of my database schema and then Class::DBI provides a

Re: [RFC] Change our habits in module naming?

2002-06-16 Thread Perrin Harkins
Also, a module map might be a good thing to create, i.e. an improved version of this: http://perl.apache.org/src/apache-modlist.html. Well, because the module list has now moved into the Perl Module List entirely, we are removing it with the new site. What I meant was that since you can't

Re: MVC Topic Joy

2002-06-15 Thread Perrin Harkins
In most cases the Handler is set to view, in which case View.pm instantiates other modules objects, (and those instantiations use other url string data to determine what to construct into the object). View then just spits out the default head, body (created with the other objects) and

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins
WO is amazing, no two ways about it. Once you use it, everything else sucks. There are no exceptions. That's kind of a rude statement to make on this list, where all of these people are offering free software and support to you. It's been a few years since I last evaluated WebObjects, but

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
My general motto is tiers eq tears ... I've never seen a really comfortable OO/SQL bridge. So who's talking about an OO/SQL bridge? Not me. At least not an automatic one. I write the SQL by hand. Group bys, order bys, multi-table selects, locking, SQL query plans and index optimisation

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
This approach works for some things, but I think it falls down when it comes to doing complex database searches, particularly searches generated ad-hoc on multiple columns in multiple tables. In general, the user interface you provide for a search will be much higher-level than the SQL that

Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins
An Object-Relational mapper takes objects and stores them in a relational database, as transparently as possible. I think the most pure example of this I've seen in the Perl world is Tangram (www.tangram-persistence.org). SPOPS is also an O-R mapper (actually, its a generic Object

Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins
Not quite sure what you mean here. The general WO request-response loop is 1 Process request 2 Perform action 3 Return response Step 3 is entirely dependent on the previous two, just like any mod_perl/CGI/php app. The introductory documentation makes it look each URL is tied to a

Re: [OT] what drives Amazon?

2002-06-15 Thread Perrin Harkins
Does anybody know which is the technology behind Amazon? If you look at their job listings, you'll see it's a lot of C/C++ and Perl, with a smattering of other things, running on Unix. That's pretty typical of the really big sites. - Perrin

Re: Mapping to location /

2002-06-13 Thread Perrin Harkins
md wrote: What I'm really trying to do is more like the PHP I'm replacing. I should be able to go to: www.someserver.com/index.phtml for a dynamic page and www.someserver.com/index.html for a static page. I'm guessing that my best solution would be to use HTML::Mason or Apache::ASP

Re: separating C from V in MVC

2002-06-13 Thread Perrin Harkins
Fran Fabrizio wrote: Now, how do you represent in the model a complex query that joins across 5 of the nouns? Others have already commented on this, but I want to point out that this is a general OO modelling question, not an MVC one, and there are many resources available to help you learn

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-13 Thread Perrin Harkins
Rob Nagler wrote: A session is useful for very limited things, like remembering if this user is logged in and linking him to a user_id. We store this information in the cookie. I don't see how it could be otherwise. It's the browser that maintains the login state. My preferred design

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread Perrin Harkins
Vuillemot, Ward W wrote: There is a Apache::Session which is sufficient to check to see if they are logged in, et cetera. But I want to be able to remember the last query so that I can return results into multple pages along with memory of where in the stack I am at. You can store anything

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread Perrin Harkins
Jeff AA wrote: Agreed, but he wasn't talking about storing the results, just the query parameters and current offset / number of rows, which is a-ok for putting into a session. No, that's exactly what ISN'T okay for putting into a session. If a user opens two browser windows, does a search

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread Perrin Harkins
John Siracusa wrote: On 6/12/02 12:57 PM, Per Einar Ellefsen wrote: But what if someone opens one of the links in a different window, and continue on the same pages as in the original window, but with different parameters? The session ID would be the same, the context id would be the same, but

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread Perrin Harkins
Rob Nagler wrote: Stateful instances are also problematic. You have essentially two paths through the code: first time and subsequent time. If you write the code statelessly, there is only one path. Fewer bugs, smaller code, less development. I find you can tie this cache stuff up inside

Re: mod_perl/passing session information (MVC related, maybe...)

2002-06-12 Thread Perrin Harkins
Jeff AA wrote: Interestingly MySQL and other DBs are often as fast as simple disk access - contrary to popular wisdom, most DB engines actually cache in memory, with more data access information and hence effective cache memory usage than is available to external cache components. Yes,

Re: separating C from V in MVC

2002-06-12 Thread Perrin Harkins
Wow, this is a long one. As usual, everyone has slightly different ideas about how to do MVC, so keep a grain of salt handy. This basic pattern repeated ad infinitum. It's grown way out of control, is a pain to work with, and just feels wrong, very wrong. :-) We've all been there. 1. Is

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
Ward Vuillemot wrote: I know we are straying WOT, but I would love to get a better feel for XML, XSLT and AxKit. Barrie Slaymaker has written a couple of articles on perl.com that serve as a good intro to AxKit. - Perrin

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
John Hurst wrote: Still, I don't think that replacing this: Location /search SetHandler perl-script PerlHandler Controller::Search /Location with this: [% Ctrl.Search() %] makes Controller::Search any less a controller. You're right. It just looks kind of odd to me,

Re: separating C from V in MVC

2002-06-11 Thread Perrin Harkins
Gerald Richter wrote: Embperl 2.0 can invoke such a controller (it's called application object there) after it has setup it's request parameters (GET/POST data, session data, etc.) and before any templates are get a chance to run. That sounds like a good addition to Embperl. Can you give a

Re: MVC Topic Joy

2002-06-10 Thread Perrin Harkins
Jon Robison wrote: I should never really have to edit #3 (the Viewer), because the HTML construction should be done in #2. If I find myself editing my viewer to accomodate some function I am adding to the overall system, I know I need to re-think what I am doing. In an MVC system, you would

Re: separating C from V in MVC

2002-06-10 Thread Perrin Harkins
Ray Zimmerman wrote: So how is everybody else handling URL mapping? In httpd.conf: Location /search SetHandler perl-script PerlHandler Controller::Search /Location Location /cart SetHandler perl-script PerlHandler Controller::ShoppingCart /Location Most applications only have a

Re: MVC Topic Joy

2002-06-10 Thread Perrin Harkins
Jon Robison wrote: In most cases the Handler is set to view, in which case View.pm instantiates other modules objects, (and those instantiations use other url string data to determine what to construct into the object). View then just spits out the default head, body (created with the other

Re: separating C from V in MVC

2002-06-10 Thread Perrin Harkins
Valerio_Valdez Paolini wrote: On Mon, 10 Jun 2002, John Hurst wrote: In the filesystem. Directly requested .tt files are all sent to a default template handler: ... I used html pages with augmented tags parsed by a standard handler: Those are both interesting and may be the most

Re: FreeBSD Apache/mod_perl/OpenSRS/expat problem + solution

2002-06-09 Thread Perrin Harkins
I just ran down a problem that was somewhat hard to find, and I didn't see any mention of anything like it in the archives anywhere. The expat issue has been discussed quite a bit on this list, and is documented here: http://perl.apache.org/guide/troubleshooting.html#Segfaults_when_using_X

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-09 Thread Perrin Harkins
What I didn't like about this is I then had to adjust the so-called controller code that decoded the user input for my request object to include these new features. But really that data was of only interest to the model. So a change in the model forced a change in the controller. No, a

Re: Building high load mod_perl/Mason servers

2002-06-09 Thread Perrin Harkins
We are going to be moving to mod_perl, but I am worried about how to keep from getting into the same kind of trap with mod_perl as with PHP. You may want to read my article about building a large site with mod_perl: http://perl.apache.org/release/docs/tutorials/apps/scale_etoys/etoys.htm l.

Re: [OT] MVC soup (was: separating C from V in MVC)

2002-06-07 Thread Perrin Harkins
Bill Moseley wrote: My MVC efforts often fall apart in the C an M separation. My M parts end up knowing too much about each other -- typically because of error conditions e.g. data that's passed to an M that does not validate. And I don't want to validate too much data in the C as the C

Re: Separating Aspects (Re: separating C from V in MVC)

2002-06-06 Thread Perrin Harkins
Sam Tregar wrote: Now, I don't use HTML::Template::Expr. I think it's generally not such a good idea. But it's there if you want it... For posterity, and possible inclusion in the next rev of the templating tutorial, how would you recommend people handle this sort of situation without

Re: tutorials (was: Re: rfc Apache::Dynagzip)

2002-06-05 Thread Perrin Harkins
Stas Bekman wrote: The ongoing discission of MVC is a good example of a tutorial candidate Incidentally, I already wrote a fair amount on this subject in the eToys-related tutorial: http://perl.apache.org/release/docs/tutorials/scale_etoys/etoys.html#Code_Structure There's a diagram, code

Re: DBI Bug

2002-06-04 Thread Perrin Harkins
Udlei Nattis wrote: hi, sorry my english ;) when i add this line in httpd.conf PerlModule DBI or use DBI(); in startup.conf apache dont start, i receive this error: /usr/local/apache-2.0/bin/apachectl: line 192: 12547 Segmentation fault $HTTPD

Re: separating C from V in MVC

2002-06-04 Thread Perrin Harkins
Rob Nagler wrote: The way I understand how plugins work is that they are arbitrary classes. But how do you share behavior? I probably wouldn't use a plugin for something that needed to output HTML, because that would prevent the designers from editing it. A macro (basically a

Re: separating C from V in MVC

2002-06-03 Thread Perrin Harkins
Rob Nagler wrote: Perrin Harkins writes: You can actually do that pretty comfortably with Template Toolkit. You could use a filter for example, which might look like this: [% FILTER font('my_first_name_font') %] ... some text, possibly with other template directives in it... [% END

Re: separating C from V in MVC

2002-06-03 Thread Perrin Harkins
Rob Nagler wrote: [Skirting on the edge of YATW. :-] I certainly don't mean to have a templating war. I'm just trying to figure out what the difference is between these approaches and if there's something I've been missing that I should consider adding to future applications. Here's your

Re: separating C from V in MVC

2002-06-02 Thread Perrin Harkins
It seems problematic to me to require the programmers to do work when a designer wants to change the number of decimals in a page, for example. HTML::Template::Expr may present a solution to this particular desire, although it isn't one I've come across. How often are HTML designers

Re: separating C from V in MVC

2002-06-02 Thread Perrin Harkins
It is interesting to try and fit our approach into the MVC+template pattern Just to clarify, it's not MVC+template; it's just MVC. The templates are one way of implementing views. You could mix and match this where appropriate, so that your Excel view is a perl module with a set of

Re: separating C from V in MVC

2002-06-02 Thread Perrin Harkins
A String widget/template allows you to control the rendering of all fonts dynamically. If the String widget/template sees the incoming request is from IE5+, it doesn't render the font if the font is the same as the default font. The Style widget/template renders the default font in a style

Re: Persistent Net::Telnet Objects

2002-05-31 Thread Perrin Harkins
French, Shawn wrote: Recall that I am using: Apache/1.3.20 (Win32) mod_perl/1.25_01-dev mod_ssl/2.8.4 OpenSSL/0.9.6a on Windows 2000 with PHP 4.21 Would this be why my scripts are working? Mystery solved! Yes, that's why. You are running mod_perl in single process mode because you're on

Re: Persistant references [was] Persistent Net::Telnet Objects

2002-05-31 Thread Perrin Harkins
First, there is no way to effectively pass compiled code between processes at this time. It isn't likely to happen with Perl 5 because attempts at loading compiled bytecode from disk have usually had poor performance and other issues. Second, what you're proposing is probably not a good idea

Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Jeff AA wrote: do you use any standards for the data being returned to the Controller? eg do you use a struct [ie hash/array Perl primitive] or do you return an object? eg a table object etc? HTML::Template requires you to pass a perl data structure. Template Toolkit can handle objects as

Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Hi Jesse, It's the addition tricks which bug me out. With those two words you establish the mother of all slippery slopes to architecture oblivion. When you have objects passing freely between your Controller and View (which are quoted here, 'cuz I don't think they are separate in this

Re: [Mason] Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Dave Rolsky wrote: Alzabo could handle a _lot_ of this for you. Class::DBI could handle some of it (though less). SPOPS is also a good choice for this. All of them are on CPAN, just waiting for you. - Perrin

Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Jeff AA wrote: For example to render a date in Excel some jiggery pokey is required, and I would also expect a HTML V to print pretty dates rather than 20020531172534 (or something other than the raw stringification) Yes. That's why you need to use a good templating system. There is a

Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Rob Nagler wrote: Layout managers accept a declaration ('this cell is northwest', 'this other one expands across the bottom', etc.). They interpret the decl at run-time. It's like HTML, but more declarative. Some attributes of our Grid manager are: cell_nowrap - don't wrap the text in

Re: separating C from V in MVC

2002-05-31 Thread Perrin Harkins
Rob Nagler wrote: Let's say, though, that you want the same template to render in a WAP, Opera, Konqueror, IE, NS, etc. The implementation of Grid handles this for you. For example, our code automatically renders style sheets for IE5+, but no other browsers. (This isn't in Grid, but you

Re: MVC advice..?

2002-05-29 Thread Perrin Harkins
Rafiq Ismail (ADMIN) wrote: Now my problem is that I have to assign which Subclass I want to instantiate, based on the script and params. So, you're asking how to map URLs to perl modules? Is there some reason you aren't simply using httpd.conf or Apache::Dispatch? In my last MVC design,

Re: separating C from V in MVC

2002-05-29 Thread Perrin Harkins
Ray Zimmerman wrote: If I understand correctly, the Mason component that generates the page the user sees would be considered the View. But where is the Controller? I wrote a little about this in my templating guide, and there has been discussion on the Mason list. A common approach is to

Re: MVC advice..?

2002-05-29 Thread Perrin Harkins
Dave Rolsky wrote: On Wed, 29 May 2002, Perrin Harkins wrote: There's no good reason to do an eval 'use'. Use require instead, and import if you need to (but most people don't). Actually, there is. This code: my $module = 'Foo::Bar'; require $module; is not the same

Re: MVC advice..?

2002-05-29 Thread Perrin Harkins
Rafiq Ismail (ADMIN) wrote: I'm not so keen on loading all the inheriting classes into memory beforehand You really should do that, because it will save overall memory by increasing the amount of memory that's shared. All modules should be loaded during startup in the parent process. It's

Re: Persistent Net::Telnet Objects

2002-05-29 Thread Perrin Harkins
French, Shawn wrote: Although this is working right now, I don't know enough [ anything? :) ] about Apache or mod_perl to be sure that this will work in the future. I can't see how it could be working now, unless it is actually creating a new Telnet object on every request. Your %sessionHash

Re: Apache::DBI connection cache

2002-05-22 Thread Perrin Harkins
Ask Bjoern Hansen wrote: Apache::DBI is turning the argument hashref into the cache key with the following code, my ($key, $val); while (($key,$val) = each %{$args[3]}) { $Idx .= $;$key=$val; } can anyone think of a good reason not to change that to

Re: Apache::GTopLimit

2002-05-21 Thread Perrin Harkins
Stas Bekman wrote: Hmm, when a new process starts it shares *everything* with the parent. Why do you say that it's not? It doesn't share everything with the parent. As soon as it forks there is unshared memory, and after the first request it handles there is usually more. Over time, the

Re: Apache::GTopLimit

2002-05-21 Thread Perrin Harkins
Stas Bekman wrote: What you are saying is that when the server is started afresh, the newly started child processes share more memory with the parent, than newly started child processes some time later. Am I correct? Yes, exactly.

Re: Apache::GTopLimit

2002-05-21 Thread Perrin Harkins
Stas Bekman wrote: Perrin Harkins wrote: Stas Bekman wrote: What you are saying is that when the server is started afresh, the newly started child processes share more memory with the parent, than newly started child processes some time later. Am I correct? Yes, exactly. Any

Re: GTop

2002-05-21 Thread Perrin Harkins
If you're not able to resolve your difficulties with GTop, try Apache::SizeLimit instead. It fully supports FreeBSD. You just need to install the BSD::Resource module, which is useful to have anyway. - Perrin

Re: Image::Size, TT, and mod_perl Question

2002-05-21 Thread Perrin Harkins
my %vars = {TOO_WIDE = 1}; That isn't doing what you think it's doing. Try this: my $vars = { 'TOO_WIDE' = 1 };

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Gregory Matthews wrote: I too thought of setting a cron job to restart the server once per day in order to keep the memory fresh. In a production environment, are there any downsides to doing this, i.e., server inaccessibility, etc..? There have been some discussion on the list about

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Per Einar Ellefsen wrote: And if something goes wrong? You'd be having a server offline with noone knowing about it. You can easilly set up mon (http://www.kernel.org/software/mon/) to page you if the server doesn't come back up within a certain amount of time. - Perrin

Re: Memory Leaks

2002-05-20 Thread Perrin Harkins
Jason wrote: If you don't want to restart the server then don't do this instead, it should help prevent small leaks from being a problem. http://httpd.apache.org/docs-2.0/mod/mpm_common.html#maxrequestsperchild Apache::SizeLimit or Apache::GTopLimit is a better way to do it, since it

Re: Monitoring the processes

2002-05-20 Thread Perrin Harkins
Gregory Matthews wrote: For example, is there a command line tool to use that will allow me to see the process growth upon request reload? I know that I should run the server with httpd -X, but I don't know how to actually see the memory being used/increased/decreased when the prog is

Re: Apache::GTopLimit

2002-05-20 Thread Perrin Harkins
Does using the Apache::GTopLimit module have the same net effect as restarting the server itself by simply killing off the actual processes which are growing beyond the set threshold, and thereby causing new processes to be born? It does kill off processes that are getting too big, and you

Re: Apache::GTopLimit

2002-05-20 Thread Perrin Harkins
So to modify my previous question, other than the loss of some shared memory over time, GTopLimit will have the same effect as restarting the server? Yes. That shared memory is important though. On a side note, how are you tracking/discovering the this minimal loss over time?

Re: Memory Leaks

2002-05-19 Thread Perrin Harkins
I have a couple of questions regarding leaking memory in mod_perl: 1. What are the main culprits, in order of severity, of memory leaks, i.e.: a. global variables (NOT lexically scoped via my) b. ... c. ... 2. When writing code from scratch (a new application), what is the best way

Re: Memory Leaks

2002-05-19 Thread Perrin Harkins
So am I being overly paranoid concerning the leak potential of mod_perl programming? No, memory management is very important with mod_perl. If I start with strict code to begin with and try my best to stay away from the problems you mentioned, then any potential memory leak/drain issues

Re: sending CGI ouput through a handler

2002-05-19 Thread Perrin Harkins
My::Handler takes the requested file and adds some markup to it with the Template Toolkit if the MIMEtype of the file is text/html. I want to be able to use the same handler to also add markup to the output of executed CGI. What is the best way to do this? You can't feed the output of

<    1   2   3   4   5   6   7   8   9   10   >