Re: header issues etc...

2007-07-03 Thread pubert na
Won't multiple simultaneous requests change the "our" variables unpredictably since they all have access to the symbol table? On 7/3/07, Perrin Harkins <[EMAIL PROTECTED]> wrote: On 7/3/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: > i prefer storing them as class variables and using a public

installing mod_perl.

2007-07-03 Thread mweiler
I am trying to install mod_perl on my Mac OS 10.3. But things aren't going so well. It all began when I downloaded the source code for mod_perl (1.3) and apache (1.3.37). I began the process of building mod_perl [as per instructions below, 1]. Things appeared to work fine until I ran 'make test'.

Re: passing CGI paramters

2007-07-03 Thread Perrin Harkins
[Please keep it on the list] On 7/3/07, Craig Tussey <[EMAIL PROTECTED]> wrote: Thanks again for responding. Here is the link to my scratchpad. Keep in mind that I was making entries to the scratchpad in response to Clintons questions. http://www.perlmonks.org/?viewmode=public;node_id=624649

Re: header issues etc...

2007-07-03 Thread Perrin Harkins
On 7/3/07, Jonathan Vanasco <[EMAIL PROTECTED]> wrote: i prefer storing them as class variables and using a public method to provide access ie: package myfactory; my $object= object->new(); sub get_object { return $object ;} Using closures just makes it more confusing.

Re: header issues etc...

2007-07-03 Thread Jonathan Vanasco
On Jul 3, 2007, at 5:51 PM, Perrin Harkins wrote: I don't really understand this description. If you're trying to code a singleton pattern, use global variables to hold the object. That makes it clearer what your intent is. Scoping works the same as usual under mod_perl. If you need acces

Re: passing CGI paramters

2007-07-03 Thread Perrin Harkins
On 7/3/07, CraigT <[EMAIL PROTECTED]> wrote: I put a lot of stuff in my (cliff) scratchpad like the ENV values, the relevant Apache httpd entries, a dump, the Apache error log, and code examples. Would it be possible for you to review the stuff I put there? Maybe later. Do you have a link fo

Re: header issues etc...

2007-07-03 Thread Perrin Harkins
[ Please keep it on the list ] On 7/3/07, pubert na <[EMAIL PROTECTED]> wrote: The app I'm working with uses this as a method for object b to retrieve the instance of object a, which created it. i.e. An object x, creates 4 objects, a,b,c, and d, then calls a method in object a. Object a need

Re: passing CGI paramters

2007-07-03 Thread CraigT
Perrin, Thanks for responding. I'm not sure why it posted four times. I'm new here. I posted the original request Sunday morning I think.I didn't get any responses, so early this morning I registered as 'cliff' with perl monks and made a similiar request. Clinton responded and worked

Re: Trying to install mod_perl 2.0 on SUSE Linux 2.6 (Dual Processor)

2007-07-03 Thread Rafael Caceres
On Tue, 2007-07-03 at 09:43 -0400, David Weintraub wrote: > I am attempting to install mod_perl on a SUSE Linux 2.6.6-7 dual > processor machine. It already has Apache 2.0.49 and Perl 5.8.3 > installed. In fact, it already had perl_mod 1.x installed, but I decided > to install perl_mod 2.0.3. > T

Re: header issues etc...

2007-07-03 Thread Perrin Harkins
On 7/2/07, pubert na <[EMAIL PROTECTED]> wrote: my $self; [...] sub doit{ print $self->{CGI}->header; print "hello"; } This is bad. You're using a variable that you didn't pass to doit(). That means you're creating a closure. The sub will remember the $self it saw when you first

Re: header issues etc...

2007-07-03 Thread Tyler Bird
Hi, I jumped into the middle of this thread and it seems I am encountering a segfault in the header just like you have described. Could you give me an overview of your solution since I do not have your first emails to this list. Thanks Tyler pubert na wrote: I fixed it... apparently it no

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Jonathan Vanasco
On Jul 3, 2007, at 4:02 AM, Clinton Gormley wrote: This last statement I have a quibble about : using mod_perl to handle file uploads. I may be wrong here, so I'd welcome reasoned disagreement, but the way I understand it: not all file uploads, but large ones. anything over 100k i won't

Re: Where to store uploads

2007-07-03 Thread Jonathan Vanasco
On Jul 3, 2007, at 10:38 AM, Clinton Gormley wrote: I didn't mean: stick the file in the DB. I meant, stick the file into a directory on a particular machine, and then put this into the DB: Sorry - I meant, store this in the DB: - ID: 1234 - type:image/jpeg - path:1

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Perrin Harkins
On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: > It's not a very important distinction, but perl code is not compiled > into C. It gets compiled to an intermediary format of Perl opcodes, > which you can see with the B:: tools. Apparently, those opcodes are C-structs, rather than an inte

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Clinton Gormley
On Tue, 2007-07-03 at 10:37 -0400, Perrin Harkins wrote: > On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: > > However, the Perl code itself has > > already been compiled into C and is fast. > > It's not a very important distinction, but perl code is not compiled > into C. It gets compiled

Re: Where to store uploads

2007-07-03 Thread Clinton Gormley
On Tue, 2007-07-03 at 10:26 -0400, Michael Peters wrote: > Clinton Gormley wrote: > > > I can think of two approaches: > > > > 1) In the DB, store the name of the server to which your file has been > >uploaded > > Don't do that. The moment you put a file into the database you loose all > of t

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Perrin Harkins
On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: However, the Perl code itself has already been compiled into C and is fast. It's not a very important distinction, but perl code is not compiled into C. It gets compiled to an intermediary format of Perl opcodes, which you can see with the

Re: Where to store uploads

2007-07-03 Thread Clinton Gormley
On Tue, 2007-07-03 at 10:26 -0400, Perrin Harkins wrote: > On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: > > 1) In the DB, store the name of the server to which your file has been > >uploaded > > I try to avoid files in the DB. It always ends in tears. Sorry - I meant, store this in

Re: Where to store uploads

2007-07-03 Thread Michael Peters
Clinton Gormley wrote: > I can think of two approaches: > > 1) In the DB, store the name of the server to which your file has been >uploaded Don't do that. The moment you put a file into the database you loose all of the nice tools that your OS gives you for working with files (grep, ls, find

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Perrin Harkins
On 7/2/07, Charlie Garrison <[EMAIL PROTECTED]> wrote: mod_auth_tkt That's what I use for this. - Perrin

Re: questions on serving big file & SQL statement parsin

2007-07-03 Thread Perrin Harkins
On 7/2/07, James. L <[EMAIL PROTECTED]> wrote: 1. "SQL statement parsing" is mentioned in the doc: http://perl.apache.org/docs/1.0/guide/performance.html#toc_Eliminating_SQL_Statement_Parsing i am curious that if it is a general practice(caching sql statement in package variable to avoid parsing

Re: Where to store uploads

2007-07-03 Thread Perrin Harkins
On 7/3/07, Clinton Gormley <[EMAIL PROTECTED]> wrote: 1) In the DB, store the name of the server to which your file has been uploaded I try to avoid files in the DB. It always ends in tears. 2) Store your upload in a shared partition (eg on a SAN, NFS, iSCSI/OCFS2) That's ok if you n

Re: passing CGI paramters

2007-07-03 Thread Perrin Harkins
Hi, There's no need to post your question four times. I'm trying to bring my application up using ModPerl::PerlRun. I have anchors at places in my code like I can't tell what you're doing from this description. Can you show us some of your code? Additionally, if I execute the same anchor

Trying to install mod_perl 2.0 on SUSE Linux 2.6 (Dual Processor)

2007-07-03 Thread David Weintraub
I am attempting to install mod_perl on a SUSE Linux 2.6.6-7 dual processor machine. It already has Apache 2.0.49 and Perl 5.8.3 installed. In fact, it already had perl_mod 1.x installed, but I decided to install perl_mod 2.0.3. I copied mod_perl.so to /usr/lib64/apache2/mod_perl.so and made a sym

Re: Where to store uploads

2007-07-03 Thread Foo JH
Depending on the number of files you're expecting, you may want to limit the number of files you put in a single folder. For example, in your shared folder you may want to create 26 subfolders - one for each letter of the alphabet. Then you drop the files in the subfolder matching the first let

HTML::Stripscripts::LibXML (was Config::Loader and HTML::StripScripts)

2007-07-03 Thread Clinton Gormley
Kjetil Kjernsmo requested a front end to HTML::StripScripts that, instead of returning HTML text, would return a LibXML Document or DocumentFragment (ie a DOM tree). I have released this as HTML::StripScripts::LibXML: http://search.cpan.org/~drtech/HTML-StripScripts-LibXML-0.10/LibXML.pm It handl

Where to store uploads

2007-07-03 Thread Clinton Gormley
Following on from the thread "questions on serving big file & SQL statement parsing", I have a related question: Where do you store your uploads? I can think of two approaches: 1) In the DB, store the name of the server to which your file has been uploaded 2) Store your upload in a shared p

Re: questions on serving big file & SQL statement parsing

2007-07-03 Thread Clinton Gormley
> > in my case, i need to do authorization. do i need > > extra mod_perl front-end server to do this? how does > > this perform? the beauty of mod_perl is that you can step in and out of the process wherever you need to. The down side is that mod_perl uses a lot of memory, so you try to keep your