From peter at psdt.com Sun Mar 1 19:15:57 2009 From: peter at psdt.com (peter at psdt.com) Date: Sun, 1 Mar 2009 19:15:57 -0800 (PST) Subject: [VPM] regex found matches array In-Reply-To: <49A8A53D.7040106@darrenduncan.net> References: <49A8A53D.7040106@darrenduncan.net> Message-ID: <62258.24.108.97.201.1235963757.squirrel@mail.webquarry.com> > Jer A wrote: >> How do i retrieve the "groups" array, from the regex query that contains >> the groups in $1 $2 $3 ...etc . the script has no hardcoded knowledge of >> the regex pattern, as it is read from a string into a $var, which is >> evaluated like this /$var/eg. >> >> Thanks in advance for all help....I hope you can understand, as I find >> it hard to explain. > > Say something like this: > > my $results = [$source =~ m/$pattern/g]; > > Then the $results array has one element per capture by the pattern. s/array/arrayref/. Any reason not to skip the enreferencing? my @results = ( $source =~ m/$pattern/g ); > Make sure the whole pattern-match expression is in list context (such as > my > array value constructor provides) or otherwise it will just (in scalar > context) > return the count of matches. > > -- Darren Duncan From darren at darrenduncan.net Sun Mar 1 20:06:56 2009 From: darren at darrenduncan.net (Darren Duncan) Date: Sun, 01 Mar 2009 20:06:56 -0800 Subject: [VPM] Perl coding styles (was Re: regex found matches array) In-Reply-To: <62258.24.108.97.201.1235963757.squirrel@mail.webquarry.com> References: <49A8A53D.7040106@darrenduncan.net> <62258.24.108.97.201.1235963757.squirrel@mail.webquarry.com> Message-ID: <49AB5B60.6090706@darrenduncan.net> peter at psdt.com wrote: > Darren wrote: >> Say something like this: >> >> my $results = [$source =~ m/$pattern/g]; >> >> Then the $results array has one element per capture by the pattern. > > s/array/arrayref/. > > Any reason not to skip the enreferencing? > > my @results = ( $source =~ m/$pattern/g ); Well yes, that version also works, by the same principles. The reason I used an arrayref in the example is because that is an aspect of my preferred Perl coding style. I find that using arrayrefs and hashrefs rather than arrays and hashes leads to more consistency in code. First this is since in the general case you have to use the refs version often, either if you want routines to accept or return collections without them flattening or if you want to have collections as elements of other collections or as object attributes; all of these happen very frequently in my experience, so why not just use the refs all the time and be done with it; it means I don't have to mix and match syntaxes. In addition, using just refs lets me name all my variables with $, which is another kind of consistency that makes my code a lot easier to read and understand, and once again is more consistent (and it also helps counter the argument by users of other languages about all the different Perl sigils being confusing; you don't have to use them); no @ or % is needed except for whole-collection derefs or when using @_. And not flattening by default is more DWIM and makes the code easier to understand. Also, on the list construction side, using [] and {} clearly documents we are building an ordered or an unordered list, whereas () on the right hand side does not; so easier to understand yet again. So, I see lots of advantages of my preferred style, and no drawbacks. And besides which, using the refs also makes the Perl 5 semantics more like the default Perl 6 semantics, which is to not flatten collections by default. -- Darren Duncan From jeremygwa at hotmail.com Tue Mar 17 15:46:12 2009 From: jeremygwa at hotmail.com (Jer A) Date: Tue, 17 Mar 2009 15:46:12 -0700 Subject: [VPM] FW: overriding perl 'our','my' keywords In-Reply-To: References: Message-ID: I want to override all 'our' and all 'my' statements in a script. how do i do this, without any third party modules, just code. this may sound funny, but I would like to initialize all declared variables to 'undef' or '()'. thanks in advance for your tips. Jeremy _________________________________________________________________ Reunite with the people closest to you, chat face to face with Messenger. http://go.microsoft.com/?linkid=9650736 -------------- next part -------------- An HTML attachment was scrubbed... URL: From darren at darrenduncan.net Tue Mar 17 16:01:54 2009 From: darren at darrenduncan.net (Darren Duncan) Date: Tue, 17 Mar 2009 16:01:54 -0700 Subject: [VPM] FW: overriding perl 'our','my' keywords In-Reply-To: References: Message-ID: <49C02BE2.9030008@darrenduncan.net> Jer A wrote: > I want to override all 'our' and all 'my' statements in a script. how do > i do this, without any third party modules, just code. > > this may sound funny, but I would like to initialize all declared > variables to 'undef' or '()'. Perl variables are already that way by default, so you have nothing to do. Otherwise, you need to give more information on what you actually want to accomplish. -- Darren Duncan From jeremygwa at hotmail.com Tue Mar 17 16:06:37 2009 From: jeremygwa at hotmail.com (Jer A) Date: Tue, 17 Mar 2009 16:06:37 -0700 Subject: [VPM] FW: overriding perl 'our','my' keywords In-Reply-To: <49C02BE2.9030008@darrenduncan.net> References: <49C02BE2.9030008@darrenduncan.net> Message-ID: I know this, but I am using modperl, and do not want to use any of the api or modules eg. because of modperl, scalers have to be cleared between connections. I would like make my cgi script, compatible with modperl, without hardly changing code. -Jeremy > Date: Tue, 17 Mar 2009 16:01:54 -0700 > From: darren at darrenduncan.net > To: victoria-pm at pm.org > Subject: Re: [VPM] FW: overriding perl 'our','my' keywords > > Jer A wrote: > > I want to override all 'our' and all 'my' statements in a script. how do > > i do this, without any third party modules, just code. > > > > this may sound funny, but I would like to initialize all declared > > variables to 'undef' or '()'. > > Perl variables are already that way by default, so you have nothing to do. > > Otherwise, you need to give more information on what you actually want to > accomplish. > > -- Darren Duncan > _______________________________________________ > Victoria-pm mailing list > Victoria-pm at pm.org > http://mail.pm.org/mailman/listinfo/victoria-pm _________________________________________________________________ Chat with the whole group, and bring everyone together. http://go.microsoft.com/?linkid=9650735 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler at yi.org Tue Mar 17 16:12:22 2009 From: tyler at yi.org (Tyler MacDonald) Date: Tue, 17 Mar 2009 16:12:22 -0700 Subject: [VPM] FW: overriding perl 'our','my' keywords In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> Message-ID: <20090317231222.GB11121@yi.org> Jer, "my" variables should be cleared between requests, since ModPerl::Registry wraps your code inside a subroutine. For "our" variables -- you may want to consider converting the ones you are concerned about to "my"'s... that is really what scoping is designed for. :-) - Tyler Jer A wrote: > > > I know this, but I am using modperl, and do not want to use any of the api or modules eg. > > because of modperl, scalers have to be cleared between connections. > > I would like make my cgi script, compatible with modperl, without hardly changing code. > > > -Jeremy > > > > > > > Date: Tue, 17 Mar 2009 16:01:54 -0700 > > From: darren at darrenduncan.net > > To: victoria-pm at pm.org > > Subject: Re: [VPM] FW: overriding perl 'our','my' keywords > > > > Jer A wrote: > > > I want to override all 'our' and all 'my' statements in a script. how do > > > i do this, without any third party modules, just code. > > > > > > this may sound funny, but I would like to initialize all declared > > > variables to 'undef' or '()'. > > > > Perl variables are already that way by default, so you have nothing to do. > > > > Otherwise, you need to give more information on what you actually want to > > accomplish. > > > > -- Darren Duncan > > _______________________________________________ > > Victoria-pm mailing list > > Victoria-pm at pm.org > > http://mail.pm.org/mailman/listinfo/victoria-pm > > _________________________________________________________________ > Chat with the whole group, and bring everyone together. > http://go.microsoft.com/?linkid=9650735 > _______________________________________________ > Victoria-pm mailing list > Victoria-pm at pm.org > http://mail.pm.org/mailman/listinfo/victoria-pm -- From jeremygwa at hotmail.com Tue Mar 17 16:18:47 2009 From: jeremygwa at hotmail.com (Jer A) Date: Tue, 17 Mar 2009 16:18:47 -0700 Subject: [VPM] FW: FW: overriding perl 'our','my' keywords In-Reply-To: <20090317231222.GB11121@yi.org> References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> Message-ID: From: jeremygwa at hotmail.com To: tyler at yi.org Subject: RE: [VPM] FW: overriding perl 'our','my' keywords Date: Tue, 17 Mar 2009 16:17:29 -0700 I would like to use 'my', but I need 'our', because the I would like to be able to modifiy the variable outside the static class, so I have to use 'our' to make it public. -Jeremy > Date: Tue, 17 Mar 2009 16:12:22 -0700 > From: tyler at yi.org > To: jeremygwa at hotmail.com > CC: darren at darrenduncan.net; victoria-pm at pm.org > Subject: Re: [VPM] FW: overriding perl 'our','my' keywords > > Jer, > > "my" variables should be cleared between requests, since > ModPerl::Registry wraps your code inside a subroutine. > > For "our" variables -- you may want to consider converting the ones > you are concerned about to "my"'s... that is really what scoping is designed > for. :-) > > - Tyler > > > Jer A wrote: > > > > > > I know this, but I am using modperl, and do not want to use any of the api or modules eg. > > > > because of modperl, scalers have to be cleared between connections. > > > > I would like make my cgi script, compatible with modperl, without hardly changing code. > > > > > > -Jeremy > > > > > > > > > > > > > Date: Tue, 17 Mar 2009 16:01:54 -0700 > > > From: darren at darrenduncan.net > > > To: victoria-pm at pm.org > > > Subject: Re: [VPM] FW: overriding perl 'our','my' keywords > > > > > > Jer A wrote: > > > > I want to override all 'our' and all 'my' statements in a script. how do > > > > i do this, without any third party modules, just code. > > > > > > > > this may sound funny, but I would like to initialize all declared > > > > variables to 'undef' or '()'. > > > > > > Perl variables are already that way by default, so you have nothing to do. > > > > > > Otherwise, you need to give more information on what you actually want to > > > accomplish. > > > > > > -- Darren Duncan > > > _______________________________________________ > > > Victoria-pm mailing list > > > Victoria-pm at pm.org > > > http://mail.pm.org/mailman/listinfo/victoria-pm > > > > _________________________________________________________________ > > Chat with the whole group, and bring everyone together. > > http://go.microsoft.com/?linkid=9650735 > > _______________________________________________ > > Victoria-pm mailing list > > Victoria-pm at pm.org > > http://mail.pm.org/mailman/listinfo/victoria-pm > > -- Make your Messenger window look the way you want. Express Yourself! _________________________________________________________________ Share photos with friends on Windows Live Messenger http://go.microsoft.com/?linkid=9650734 -------------- next part -------------- An HTML attachment was scrubbed... URL: From tyler at yi.org Tue Mar 17 16:27:18 2009 From: tyler at yi.org (Tyler MacDonald) Date: Tue, 17 Mar 2009 16:27:18 -0700 Subject: [VPM] FW: FW: overriding perl 'our','my' keywords In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> Message-ID: <20090317232718.GC11121@yi.org> Jer A wrote: > I would like to use 'my', but I need 'our', because the I would like to be > able to modifiy the variable outside the static class, so I have to use > 'our' to make it public. Maybe re-think your encapsulation... you're trying to move from the assumption that a script goes away when you're done to the assumption that it sticks around forever. If you still want to be able to call the scripts from CGI, that shouldn't be too difficult while changing your object model to support re-entry -- but if you're just trying to move over to mod_perl as quickly as possible, i strongly suggest you slow down and put out the work to make it compatible instead of looking for hacky ways around best practices. :-) Cheers, Tyler From jeremygwa at hotmail.com Tue Mar 17 16:35:33 2009 From: jeremygwa at hotmail.com (Jer A) Date: Tue, 17 Mar 2009 16:35:33 -0700 Subject: [VPM] FW: FW: overriding perl 'our','my' keywords In-Reply-To: <20090317232718.GC11121@yi.org> References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: so what people are saying, there is no way to override keywords 'our' or 'my' optimally i would like something that follows this psuedo code sub keyword { ($valueref) = @_; call internal keyword with argument eg. my or our on valueref...dunno, but would i have to declare by val? if $valueref is a string, clear it "",undef if $valueref is an array or hash , clear it () } > Date: Tue, 17 Mar 2009 16:27:18 -0700 > From: tyler at yi.org > To: jeremygwa at hotmail.com > CC: darren at darrenduncan.net; victoria-pm at pm.org > Subject: Re: [VPM] FW: FW: overriding perl 'our','my' keywords > > Jer A wrote: > > I would like to use 'my', but I need 'our', because the I would like to be > > able to modifiy the variable outside the static class, so I have to use > > 'our' to make it public. > > Maybe re-think your encapsulation... you're trying to move from the > assumption that a script goes away when you're done to the assumption that > it sticks around forever. > > If you still want to be able to call the scripts from CGI, that shouldn't > be too difficult while changing your object model to support re-entry -- but > if you're just trying to move over to mod_perl as quickly as possible, i > strongly suggest you slow down and put out the work to make it compatible > instead of looking for hacky ways around best practices. :-) > > Cheers, > Tyler > _________________________________________________________________ Reinvent how you stay in touch with the new Windows Live Messenger. http://go.microsoft.com/?linkid=9650731 -------------- next part -------------- An HTML attachment was scrubbed... URL: From Peter at PSDT.com Tue Mar 17 17:17:42 2009 From: Peter at PSDT.com (Peter Scott) Date: Tue, 17 Mar 2009 17:17:42 -0700 Subject: [VPM] FW: FW: overriding perl 'our','my' keywords In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> Message-ID: <6.2.3.4.2.20090317171523.038593d0@mail.webquarry.com> At 04:18 PM 3/17/2009, Jer A wrote: >I would like to use 'my', but I need 'our', because the I would like >to be able to modifiy the variable outside the static class, so I have >to use 'our' to make it public. Typically a best practice is to make the class object-oriented and provide accessors for changing class variables, thus allowing them to be lexical: my $class_foo; sub set_foo { $class_foo = pop } Only there are some helper modules to make this easier, inheritable, etc. I'm getting into Moose these days and I like it, although I haven't used it with mod_perl. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ http://www.perlmedic.com/ From Peter at PSDT.com Tue Mar 17 17:28:16 2009 From: Peter at PSDT.com (Peter Scott) Date: Tue, 17 Mar 2009 17:28:16 -0700 Subject: [VPM] FW: FW: overriding perl 'our','my' keywords In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: <6.2.3.4.2.20090317172208.038b2ac0@mail.webquarry.com> At 04:35 PM 3/17/2009, Jer A wrote: >so what people are saying, there is no way to override keywords 'our' or 'my' > >optimally i would like something that follows this psuedo code > >sub keyword { >($valueref) = @_; >call internal keyword with argument eg. my or our on valueref...dunno, >but would i have to declare by val? >if $valueref is a string, clear it "",undef >if $valueref is an array or hash , clear it () > >} You can do this with source filters. Filter::Simple if you must. I *strongly* counsel against it. There are inherent problems with source filtering such that I would only use them in novelty code. IIRC it is also possible to diddle Perl's optree, maybe with B::Generate, although ISTR there is a newer and easier way, anyone know what I'm thinking of? But, like, gross. This kind of thing is a sure sign that you're headed down the wrong path. And even if you got it working the code would be horrible for anyone to understand. -- Peter Scott Pacific Systems Design Technologies http://www.perldebugged.com/ http://www.perlmedic.com/ From jeremygwa at hotmail.com Sat Mar 21 16:12:59 2009 From: jeremygwa at hotmail.com (Jer A) Date: Sat, 21 Mar 2009 16:12:59 -0700 Subject: [VPM] mod rewrite and CGI question In-Reply-To: <20090317232718.GC11121@yi.org> References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: hi all, Is it possible to use mod rewrite and a standard perl CGI script, without having to have mod perl installed? Jeremy _________________________________________________________________ Experience all of the new features, and Reconnect with your life. http://go.microsoft.com/?linkid=9650730 -------------- next part -------------- An HTML attachment was scrubbed... URL: From peter at psdt.com Sat Mar 21 19:14:26 2009 From: peter at psdt.com (peter at psdt.com) Date: Sat, 21 Mar 2009 19:14:26 -0700 (PDT) Subject: [VPM] mod rewrite and CGI question In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: <57544.24.108.97.201.1237688066.squirrel@mail.webquarry.com> > > hi all, > > Is it possible to use mod rewrite and a standard perl CGI script, without > having to have mod perl installed? I don't see why not. Try it and let us know. From jeremygwa at hotmail.com Tue Mar 24 22:07:43 2009 From: jeremygwa at hotmail.com (Jer A) Date: Tue, 24 Mar 2009 22:07:43 -0700 Subject: [VPM] backup MySQL database with perl In-Reply-To: <20090317232718.GC11121@yi.org> References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: All, I am learning MySQL. I can manually backup use PHPmyAdmin. what is an easy way to backup a database with perl (DBI), programmatically, without knowledge of it's structure/contents (eg. tables/records etc). I would like to create some sort of scheduler for this as well. also, I wondering if backing it up as an email attachment is a good thing as well? -jeremy _________________________________________________________________ Experience all of the new features, and Reconnect with your life. http://go.microsoft.com/?linkid=9650730 -------------- next part -------------- An HTML attachment was scrubbed... URL: From darren at darrenduncan.net Tue Mar 24 22:18:38 2009 From: darren at darrenduncan.net (Darren Duncan) Date: Tue, 24 Mar 2009 22:18:38 -0700 Subject: [VPM] backup MySQL database with perl In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: <49C9BEAE.5080007@darrenduncan.net> Jer A wrote: > I am learning MySQL. I can manually backup use PHPmyAdmin. > > what is an easy way to backup a database with perl (DBI), > programmatically, without knowledge of it's structure/contents (eg. > tables/records etc). > > I would like to create some sort of scheduler for this as well. > also, I wondering if backing it up as an email attachment is a good > thing as well? I can't tell you the details so you'll have to look them up, but one simple solution is to just invoke the 'mysql' command-line utility that comes with the DBMS. I have used a line like the following to upload records into a MySQL database using that utility: mysql --user=myuser --password=mypass mydbname < mysqlfilename I assume you can use a similar one-liner to dump the contents of a MySQL database as a SQL text file. At that point all your script has to do is put that file somewhere. Or if your script invokes the shell, it can call 'mysql' directly and just feed it custom file names so then 'mysql' puts the file where you want. That's by far the simplest solution, not to mention probably the fastest and most reliable. That said, be careful that the exact version I showed you may be insecure because your db password would show up in the process list or shell history file. There is probably another way to invoke 'mysql' where it would then prompt you for a password, but that would be more complicated to automate. Don't bother with DBI etc in Perl unless you want to make all sorts of changes to your data in the backup process, or just do selective backups, etc. -- Darren Duncan From matt at elrod.ca Tue Mar 24 23:11:15 2009 From: matt at elrod.ca (Matt Elrod) Date: Tue, 24 Mar 2009 23:11:15 -0700 Subject: [VPM] backup MySQL database with perl In-Reply-To: References: <49C02BE2.9030008@darrenduncan.net> <20090317231222.GB11121@yi.org> <20090317232718.GC11121@yi.org> Message-ID: <49C9CB03.9080608@elrod.ca> I'd use mysqldump with cron to save a backup to disk. http://dev.mysql.com/doc/refman/5.1/en/mysqldump.html Databases can be big for attachments, but you can also call gzip from cron, so it might work on small databases. Matt Jer A wrote: > All, > > I am learning MySQL. I can manually backup use PHPmyAdmin. > > what is an easy way to backup a database with perl (DBI), > programmatically, without knowledge of it's structure/contents (eg. > tables/records etc). > > I would like to create some sort of scheduler for this as well. > also, I wondering if backing it up as an email attachment is a good > thing as well? From darren at darrenduncan.net Wed Mar 25 02:40:00 2009 From: darren at darrenduncan.net (Darren Duncan) Date: Wed, 25 Mar 2009 02:40:00 -0700 Subject: [VPM] ANNOUNCE - Set::Relation versions 0.8.0 and 0.9.0 for Perl 5 Message-ID: <49C9FBF0.10704@darrenduncan.net> P.S. I last posted about this on Feb 10th for the first feature-complete release. ---------- All, I am pleased to announce that Set::Relation (relational types and operators for Perl) versions 0.8.0 and 0.9.0 for Perl 5 have been released on CPAN. http://search.cpan.org/dist/Set-Relation/ First, to briefly repeat the change information for last month's release 0.7.0 (from 0.6.0 which was the first initial-feature-complete release): Set::Relation is now a role (or actually 2 roles, one immutable, one mutable), so it is easier for user code to just say they accept any objects doing that role, and the initial implementation was separated into another file called V1. It is now also easier for third parties to make distinct implementations if they wish. And yes, this role is in terms of an actual Moose role. Now the main change in version 0.8.0 from version 0.7.0 is the addition of a second bundled implementation of the Set::Relation role, called V2. Feature-wise, V2 should have considerably better performance than V1 in general, and especially for some use cases. V2 also does strictly immutable objects while V1 does mutable objects. Design-wise, both V1 and V2 are similar in many respects, including the use of a Perl Hash internally to represent each relation tuple. How they differ mainly is that V1 does eager tuple hashing and duplicate elimination while V2 does lazy tuple hashing and duplicate elimination. Another feature change in 0.8.0 from 0.7.0 is that users have the option on some Set::Relation method calls to say they accept less accuracy in results, so for example they give permission for duplicate elimination to be skipped entirely, and what they gain from this conceptually is an even greater speed increase. Now the kind of operations where you would likely see the greatest speed increase with V2 automatically, are for [new(), union(), insertion()] as they are done with zero hashing or elimination; and to a lesser extent join() etc since it only indexes the common attributes on the join; and optionally on cardinality() and members extraction, as they also avoid all hashing/etc when explicitly asked to, thereby the class sort-of doing multisets rather than sets as normal. In contrast with V2, operations like [intersection(), difference(), deletion()] still incur indexing / duplicate elimination in order to make sure all copies of a filtered-out tuple are eliminated. Version 0.8.0 does not introduce any major API changes or capability features. Note that I recommend V2 over V1 for actual use, where either would be useful; I don't consider them on equal footing. And the main change in version 0.9.0 from version 0.8.0 is the addition of support for specifying candidate keys or (unique) key constraints on Set::Relation objects at object creation time, and introspecting for candidate keys on the objects after creation. Version 0.9.0 was just a first draft of the 'keys' feature and it isn't very well integrated. What is stated above is about as far as it goes. Still TODO is to actually exploit knowledge of keys to speed up the relational operators, since you can do indexing or duplicate elimination much less expensively if you know you only have to examine a subset of the attributes' values. On a related matter, today I updated http://www.perlfoundation.org/perl5/index.cgi?gsoc_2009_projects to add a student project idea to implement Perl 6 savvy relational types and operators, starting with porting Set::Relation to Perl 6. Now said port was something I otherwise would have done within the next few months, and the Perl 5 module was designed from day one that this would happen in mind, but I figured this was something it would be nice to have a fresh outlook on, since someone else say a student may come up with the functionality in much more idiomatic Perl 6 than I would have. And its not like any prerequisites they might need from me aren't already done now; the existing Perl 5 version already illustrates the desired features and behavior, which they are of course free to improve on. Now in the likely event that no student picks this up, I welcome input from you / the community on how to do better than a straight port and provide better Perl 6 savvyness. Thank you and have a good day. -- Darren Duncan From jeremygwa at hotmail.com Wed Mar 25 12:58:55 2009 From: jeremygwa at hotmail.com (Jer A) Date: Wed, 25 Mar 2009 12:58:55 -0700 Subject: [VPM] http 1.1 compression and cgi output Message-ID: hi all, so I have this cgi that returns data from a database, that has over 13,000 possible queries for output. some of the queries output alot of data. I would like to use http 1.1 compression (deflate,GZip), but as this is a cgi script, I do not want to much of a performance hit....I try to load minimal modules (please note: I do not use CGI.pm) I do not think that caching the compressed data will be any good, as it will make my database huge, and I do not have alot of space, as well the db may be updated frequently. I am new to working with databases, and http 1.1 compression, are there any alternatives? -Jeremy _________________________________________________________________ Chat with the whole group, and bring everyone together. http://go.microsoft.com/?linkid=9650735 -------------- next part -------------- An HTML attachment was scrubbed... URL: