Re: cvs version make test errors
Jie Gao wrote: Hi All, I got a version from cvs today and make test fails with: special_blocks.ok 5/12unable to find interp de76d477-58b9-0310-b94d-dd991812e62e Thanks Jie. Your bug report missing the mod_perl and apache information. You should have run t/REPORT to get this as explained here: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems I can't tell whether you are running a threaded-mpm or a prefork. However, this is not a bug in mod_perl, but a current limitation in one of the testing framework functionalities. Certain tests need to make sure that they hit the same interpreter twice in a row (e.g. to test the closure effect), apparently the current implementation doesn't work well on several platforms, win32 included. If somebody (preferrably on a platform that has this problem) can look at this issue and resolve it, that would be a great help. You can find the code in Apache-Test/lib/Apache/TestRequest.pm and you have several tests that use it (grep for 'same_interp_tie'). The currently used algorithm is very simple: the first request stores the unique id of the perl interpreter in the response headers and on the following requests the client supplies this header. Apache::TestRequest resubmits the request again and again till it hits the same interpreter and only then returns the response to the client. After TRY_TIMES (50) it'll give up and return an error. I'm not sure whether raising of this number to let's say 500 will help to solve the problem. Your help is appreciated. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs version make test errors
On Fri, 21 Mar 2003, Stas Bekman wrote: Date: Fri, 21 Mar 2003 14:09:11 +1100 From: Stas Bekman [EMAIL PROTECTED] To: Jie Gao [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Subject: Re: cvs version make test errors Jie Gao wrote: Hi All, I got a version from cvs today and make test fails with: special_blocks.ok 5/12unable to find interp de76d477-58b9-0310-b94d-dd991812e62e Thanks Jie. Your bug report missing the mod_perl and apache information. You should have run t/REPORT to get this as explained here: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems I can't tell whether you are running a threaded-mpm or a prefork. However, this is not a bug in mod_perl, but a current limitation in one of the testing framework functionalities. Certain tests need to make sure that they hit the same interpreter twice in a row (e.g. to test the closure effect), apparently the current implementation doesn't work well on several platforms, win32 included. If somebody (preferrably on a platform that has this problem) can look at this issue and resolve it, that would be a great help. You can find the code in Apache-Test/lib/Apache/TestRequest.pm and you have several tests that use it (grep for 'same_interp_tie'). The currently used algorithm is very simple: the first request stores the unique id of the perl interpreter in the response headers and on the following requests the client supplies this header. Apache::TestRequest resubmits the request again and again till it hits the same interpreter and only then returns the response to the client. After TRY_TIMES (50) it'll give up and return an error. I'm not sure whether raising of this number to let's say 500 will help to solve the problem. Your help is appreciated. Guess what, I ran the test again, it passed. :-) I figure this had to do with the load of the machine. Anyway, I was using threaded-mpm with apache 2.0.44. Many thanks, Jie
Re: cvs version make test errors
Jie Gao wrote: I got a version from cvs today and make test fails with: special_blocks.ok 5/12unable to find interp de76d477-58b9-0310-b94d-dd991812e62e Thanks Jie. Your bug report missing the mod_perl and apache information. You should have run t/REPORT to get this as explained here: http://perl.apache.org/docs/2.0/user/help/help.html#Reporting_Problems I can't tell whether you are running a threaded-mpm or a prefork. However, this is not a bug in mod_perl, but a current limitation in one of the testing framework functionalities. Certain tests need to make sure that they hit the same interpreter twice in a row (e.g. to test the closure effect), apparently the current implementation doesn't work well on several platforms, win32 included. If somebody (preferrably on a platform that has this problem) can look at this issue and resolve it, that would be a great help. You can find the code in Apache-Test/lib/Apache/TestRequest.pm and you have several tests that use it (grep for 'same_interp_tie'). The currently used algorithm is very simple: the first request stores the unique id of the perl interpreter in the response headers and on the following requests the client supplies this header. Apache::TestRequest resubmits the request again and again till it hits the same interpreter and only then returns the response to the client. After TRY_TIMES (50) it'll give up and return an error. I'm not sure whether raising of this number to let's say 500 will help to solve the problem. Your help is appreciated. Guess what, I ran the test again, it passed. :-) I figure this had to do with the load of the machine. Anyway, I was using threaded-mpm with apache 2.0.44. Thanks. However this still needs to be fixed, as random failures aren't good enough. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: modperl Makefile.PL
[EMAIL PROTECTED] wrote: randyk 2003/02/20 08:42:46 Modified:.Makefile.PL Log: Reviewed by: stas Use Perl's touch(), in case a system touch() isn't available. Revision ChangesPath 1.208 +5 -1 modperl/Makefile.PL Index: Makefile.PL === RCS file: /home/cvs/modperl/Makefile.PL,v retrieving revision 1.207 retrieving revision 1.208 diff -u -r1.207 -r1.208 --- Makefile.PL 20 Feb 2003 16:34:35 - 1.207 +++ Makefile.PL 20 Feb 2003 16:42:46 - 1.208 -1602,7 +1602,11 my $to = '$(INST_ARCHLIB)/' . auto/Apache/include/$_; unless ($self-{PM}-{$from}) { $self-{PM}-{$from} = $to; - system $Config{touch} $from; +# system $Config{touch} $from; + my args = ($Config{perlpath}, '-MExtUtils::Command', + '-e', 'touch', $from); + system(args) == 0 + or die system args failed: $?; } } since we use cvs, we don't commented out snippets of the older code that was replaced with the new one. If in the future we realize the the recent change broke something we can always revert to the previous version. So please remove this commented out line and the same in your other commit on PERL_SECTIONS. Thanks. BTW, in case you were wondering. the style guide doesn't apply to the modperl (1.0) rep, since it's all a mess. We try to keep it clean for 2.0 from the very beginning. __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: modperl-2.0 Changes
+package Apache::Connection; + +# auth_type and user records don't exist in 2.0 conn_rec struct +# 'PerlOptions +GlobalRequest' is required +sub auth_type { Apache-request-auth_type } +sub user { Apache-request-user } + 1; __END__ I think this may need a bit more thought (or at least more explanation). in 1.0 there is both $r-auth_type and $c-auth_type, and they have different meanings. $r-auth_type represents the AuthType from the config (via r-per_dir_config). when you get $r-auth_type, you're asking what kind of authentication is configured for the request. $c-auth_type is populated by authen handlers, after the user has been authenticated, with whatever authentication method was used. I'm not sure about the history of this, but I suppose in theory it is possible for a client to request Digest auth, but the server fall back to Basic. at any rate, I don't know how the current 2.0 or 2.1 aaa stuff handles this difference, if at all, but we (well, I :) need to be clear on how that works before agreeing that $r-connection-auth_type in Apache::Compat is the same as $r-auth_type. --Geoff
Re: cvs commit: modperl-docs/tmpl/custom/html download_linkpage_toc_section
Per Einar Ellefsen wrote: At 19:59 27.04.2002, Stas Bekman wrote: Don't misunderstand: when i said TOC I meant the list of links on the front page etc. have you checked the front page on perl.apache.org? These lists aren't generated with ul but with various dl inside a div class=toc. I guess this was forgotten. Well, we Allan suggested this change, I've agreed with Allan, nobody said otherwise, the change went it. What's wrong with index.html pages having their items underlined? Hmm, I missed that part :( Well, I think it looked better before. A lot cleaner in my opinion. But if you prefer it as it is now, I won't complain about it. I think the point is that not in what are our private preferences are. It's about deciding what's good for the average user. It's a know fact that all usability consultants preach that the sites shouldn't change the expected behavior to make it easier on the user. That means underlined links, blue color for the links, redish for the visited links. We try to follow this rule with a few exceptions where we think the underlining adds too much noise and it's absolutely clear that the menu is comprised of links. So it's easy with the menu. Now the TOC part is harder, since it's not clear that TOC is a clickable menu, but you learn that fast. So far so good. The rest of the elements which aren't menus should have the default behaviour. It made sense to have no-underline for index.html items when they had no description. Now when the description is in place the underlining is more importants, since not everything is a link (think of color blind people). Sure people can learn after a while that index.html's items always start with links, but that's much harder when the links are mixed with non links (and it doesn't work for everybody, think color-blind again). If you think this logic is wrong, please explain why and then we can re-consider. If someones doesn't participate in the discussions, it's obvious that his opinion won't be heard by others, and the decisions are made based on the opinions of the others... argh, sometimes I talk too much, and it's late... i should stop talking, going to sleep... :) __ Stas BekmanJAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide --- http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
Re: cvs commit: modperl/t/net/perl util.pl
A casual user won't understand that documentation... Hell, I'm not even sure I completely understand the implications of it and when to use/not use escape_html based on it... I think an example is called for, but not in the POD... Maybe in the Guide? Issac Eric Cholet wrote: --On Sunday, March 24, 2002 21:57:54 + [EMAIL PROTECTED] wrote: dougm 02/03/24 13:57:53 Modified:.Changes STATUS src/modules/perl Util.xs t/net/perl util.pl Log: Submitted by: Geoff Young [EMAIL PROTECTED] Reviewed by:dougm properly escape highbit chars in Apache::Utils::escape_html This is uncool for those of us using a non-ASCII encoding and sending out lots of characters with the 8th bit set, e.g. in a French page many accented characters will be replaced by 6-byte sequences. If I'm sending out Content-type: text/html; charset=ISO-8859-1, and calling escape_html to escape '', '' and the like, I'm going to be serving quite a lot more bytes than before this patch. However escape_html () has no clue as to what the character set is, and whether it has been correctly specified in the Content-Type. It has also be mentionned here that escape_html is only valid for single-byte encodings. So this patch does the right thing to escape the odd 8 bit char in a mostly ASCII output, but users of other charsets should be warned not to use it. I use HTML::Entities::encode($_[0], '') myself. Therefore I propose a doc patch to clear this up: Index: Util.pm === RCS file: /home/cvs/modperl/Util/Util.pm,v retrieving revision 1.8 diff -u -r1.8 Util.pm --- Util.pm4 Mar 2000 20:55:47 -1.8 +++ Util.pm25 Mar 2002 18:19:37 - @@ -68,6 +68,13 @@ my $esc = Apache::Util::escape_html($html); +This function is unaware of its argument's character set and encoding. +It assumes a single-byte encoding and escapes all characters with the +8th bit set. Do not use it with multi-byte encodings such as utf8. +When using a single byte non-ASCII encoding such as ISO-8859-1, +consider specifying the character set in the Content-Type header, +and using HTML::Entities to avoid unnecessary escaping. + =item escape_uri This function replaces all unsafe characters in the $string with their -- Eric Cholet - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: modperl/t/net/perl util.pl
--On Sunday, March 24, 2002 21:57:54 + [EMAIL PROTECTED] wrote: dougm 02/03/24 13:57:53 Modified:.Changes STATUS src/modules/perl Util.xs t/net/perl util.pl Log: Submitted by: Geoff Young [EMAIL PROTECTED] Reviewed by:dougm properly escape highbit chars in Apache::Utils::escape_html This is uncool for those of us using a non-ASCII encoding and sending out lots of characters with the 8th bit set, e.g. in a French page many accented characters will be replaced by 6-byte sequences. If I'm sending out Content-type: text/html; charset=ISO-8859-1, and calling escape_html to escape '', '' and the like, I'm going to be serving quite a lot more bytes than before this patch. However escape_html () has no clue as to what the character set is, and whether it has been correctly specified in the Content-Type. It has also be mentionned here that escape_html is only valid for single-byte encodings. So this patch does the right thing to escape the odd 8 bit char in a mostly ASCII output, but users of other charsets should be warned not to use it. I use HTML::Entities::encode($_[0], '') myself. Therefore I propose a doc patch to clear this up: Index: Util.pm === RCS file: /home/cvs/modperl/Util/Util.pm,v retrieving revision 1.8 diff -u -r1.8 Util.pm --- Util.pm 4 Mar 2000 20:55:47 - 1.8 +++ Util.pm 25 Mar 2002 18:19:37 - @@ -68,6 +68,13 @@ my $esc = Apache::Util::escape_html($html); +This function is unaware of its argument's character set and encoding. +It assumes a single-byte encoding and escapes all characters with the +8th bit set. Do not use it with multi-byte encodings such as utf8. +When using a single byte non-ASCII encoding such as ISO-8859-1, +consider specifying the character set in the Content-Type header, +and using HTML::Entities to avoid unnecessary escaping. + =item escape_uri This function replaces all unsafe characters in the $string with their -- Eric Cholet
Re: cvs commit: modperl/t/net/perl util.pl
i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? thanks.
Re: cvs commit: modperl/t/net/perl util.pl
Doug MacEachern wrote: i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. sounds wise, especially considering people like Eric will end up with larger pages as a result, while the patch fixes a rather obscure vunerability, for which other solutions (HTML::Entities) are available. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? I nominate robin, since I forget how it came up in the first place :) IIRC is was due to this post http://www.xray.mpe.mpg.de/mailing-lists/perl5-porters/2000-03/msg00750.html and specifically an exploit involving browsers incorrectly assuming 0x8b as a and 0x9b as a , thus creating a way around escape_html(). Robin, does that accurately summarize it? it's been far too long for me :) --Geoff
Re: cvs commit: modperl/t/net/perl util.pl
--On Monday, March 25, 2002 10:29:11 -0800 Doug MacEachern [EMAIL PROTECTED] wrote: i had a bad feeling about this. we should not be implementing escape_html to begin with, the functionality should all be in apache. i'm going to back out the patch. anybody care to make a doc patch to explain the problems with escape_html before the patch went in? thanks. I believe the patch is useful though, in cases where the charset is not explicitely specified and there's an odd character with the 8th bit set it will now do the right thing. I guess a lot of US coders would fall in that situation... I suppose it's faster than HTML::Entities (I haven't benchmarked it though). So I suspect the patch will fix more situations than it breaks: if using a single-byte non-ASCII encoding, it doesn't actually break anything, just adds bloat. If using a multi-byte encoding escape_html was broken/inapplicable already. -- Eric Cholet
RE: cvs commit: modperl/eg README httpd.conf.pl perl_sections.txt perl_sections_2.txt perlio.pl registry.pl startup.pl test.pl
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Saturday, March 02, 2002 12:38 AM To: [EMAIL PROTECTED] Subject: cvs commit: modperl/eg README httpd.conf.pl perl_sections.txt perl_sections_2.txt perlio.pl registry.pl startup.pl test.pl ask 02/03/01 21:38:22 Modified:eg README Removed: eg httpd.conf.pl perl_sections.txt perl_sections_2.txt perlio.pl registry.pl startup.pl test.pl Log: remove obsolete exampels we both forgot to update the MANIFEST for the stuff we removed: Warning: the following files are missing in your kit: ToDo eg/httpd.conf.pl eg/perl_sections.txt eg/registry.pl eg/startup.pl eg/test.pl Please inform the author. I'd take care of it, but I didn't see a commit email come through for the addition of the STATUS file, even though I got the mailing commit message... message from log_accum.pl, so maybe something is up with my access yet... --Geoff
Re: CVS
On Thu, 15 Nov 2001, Jonathan M. Hollin wrote: Date: Thu, 15 Nov 2001 14:31:57 - From: Jonathan M. Hollin [EMAIL PROTECTED] To: mod_perl Mailing List [EMAIL PROTECTED] Subject: CVS Hi people, I am currently developing a content management system under mod_perl, with data stored in an RDBMS (MySQL at present, but Oracle on the production server). I would like to add version control to published documents (read pages) and wondered if anyone has any experience of this who would be willing to offer me some advice. I have a CVS server and am curious as to whether there is some way this can used (bearing in mind that I want to manage DB data, not files). I would like to be able to rollback to any previous version (if possible), and would also like to document the different versions themselves. I'm thinking that I could maybe commit the database files to CVS and then use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS, etc). Is this possible? Has anyone ever tried anything like this? I have searched CPAN and used Google to search the web and Usenet but have so far drawn a blank. I suspect that I will not be able to use CVS in this manner and that therefore I am going to have to roll my own. If this does turn out to be case - can anyone lend me any guidance as to how I work out what's changed in a record (between versions)? Then I can just store the changes in a DB as required. Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/ Jonathan, I worked on a system earlier this year that had a need for revision control of files. I decided to use RCS and the Rcs.pm Perl module. The Rcs.pm module actually had several flaws which I tried to communicate to the author, but I never heard from him. However, with my fixes, I found using RCS to be perfectly adequate for my needs. I interacted with a database, as well (MySQL), but only to store the file's location and some meta-data on the file. I really enjoyed using RCS, allowing it to handle the manipulation of the files. Personally, I didn't feel I could roll anything better than RCS, though you may feel different about replicating CVS's functionality. ky
Re: CVS
it seems that also webdav will have versioning features www.webdav.org Francesco - Original Message - From: Jonathan M. Hollin [EMAIL PROTECTED] To: mod_perl Mailing List [EMAIL PROTECTED] Sent: Thursday, November 15, 2001 3:31 PM Subject: CVS Hi people, I am currently developing a content management system under mod_perl, with data stored in an RDBMS (MySQL at present, but Oracle on the production server). I would like to add version control to published documents (read pages) and wondered if anyone has any experience of this who would be willing to offer me some advice. I have a CVS server and am curious as to whether there is some way this can used (bearing in mind that I want to manage DB data, not files). I would like to be able to rollback to any previous version (if possible), and would also like to document the different versions themselves. I'm thinking that I could maybe commit the database files to CVS and then use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS, etc). Is this possible? Has anyone ever tried anything like this? I have searched CPAN and used Google to search the web and Usenet but have so far drawn a blank. I suspect that I will not be able to use CVS in this manner and that therefore I am going to have to roll my own. If this does turn out to be case - can anyone lend me any guidance as to how I work out what's changed in a record (between versions)? Then I can just store the changes in a DB as required. Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/
RE: CVS
Ken, I am using Rcs.pm in production. Could you give me more details about the flaws you have found and if possible could you post the patch(or code change)? Thanks, -Niraj -Original Message- From: Ken Y. Clark [mailto:[EMAIL PROTECTED]] Sent: Thursday, November 15, 2001 9:43 AM To: Jonathan M. Hollin Cc: mod_perl Mailing List Subject: Re: CVS On Thu, 15 Nov 2001, Jonathan M. Hollin wrote: Date: Thu, 15 Nov 2001 14:31:57 - From: Jonathan M. Hollin [EMAIL PROTECTED] To: mod_perl Mailing List [EMAIL PROTECTED] Subject: CVS Hi people, I am currently developing a content management system under mod_perl, with data stored in an RDBMS (MySQL at present, but Oracle on the production server). I would like to add version control to published documents (read pages) and wondered if anyone has any experience of this who would be willing to offer me some advice. I have a CVS server and am curious as to whether there is some way this can used (bearing in mind that I want to manage DB data, not files). I would like to be able to rollback to any previous version (if possible), and would also like to document the different versions themselves. I'm thinking that I could maybe commit the database files to CVS and then use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS, etc). Is this possible? Has anyone ever tried anything like this? I have searched CPAN and used Google to search the web and Usenet but have so far drawn a blank. I suspect that I will not be able to use CVS in this manner and that therefore I am going to have to roll my own. If this does turn out to be case - can anyone lend me any guidance as to how I work out what's changed in a record (between versions)? Then I can just store the changes in a DB as required. Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/ Jonathan, I worked on a system earlier this year that had a need for revision control of files. I decided to use RCS and the Rcs.pm Perl module. The Rcs.pm module actually had several flaws which I tried to communicate to the author, but I never heard from him. However, with my fixes, I found using RCS to be perfectly adequate for my needs. I interacted with a database, as well (MySQL), but only to store the file's location and some meta-data on the file. I really enjoyed using RCS, allowing it to handle the manipulation of the files. Personally, I didn't feel I could roll anything better than RCS, though you may feel different about replicating CVS's functionality. ky LEGAL NOTICE Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this E-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this E-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately.
RE: CVS
On Thu, 15 Nov 2001, Sheth, Niraj wrote: Date: Thu, 15 Nov 2001 10:05:29 -0500 From: Sheth, Niraj [EMAIL PROTECTED] To: 'Ken Y. Clark' [EMAIL PROTECTED] Cc: mod_perl Mailing List [EMAIL PROTECTED] Subject: RE: CVS Ken, I am using Rcs.pm in production. Could you give me more details about the flaws you have found and if possible could you post the patch(or code change)? Thanks, -Niraj Niraj, Well, I seem to have misplaced my version of the module. I found something old, but it doesn't look quite right. The biggest thing I can remember is that I couldn't get the original to work well under mod_perl because errors were reported via Carp::croak. I changed all those to die statements which I then caught with my calling module. I'm continuing to search for what I believe is a more reliable copy of what I used. If I find anything, I'll try writing Craig Freter again. I believe previous e-mails to him bounced or went unanswered, but that was several months and a couple projects ago, so I don't quite remember everything too clearly. ky
[OT] Re: CVS
I assume you are not expecting much to change in the database, and that you are therefore mostly doing selects, so why not continue to use MySQL? If you do, you can use MySQL's Update Log to take snapshots of the database whenever you want (and store them somewhere with date-appropriate names) and use them for versioning. Rolling back to an earlier version of your data is as simple as creating a new DB from your table defs, then mysqlbinlog log-file | mysql new-db See http://www.mysql.com/doc/B/i/Binary_log.html for more info. ~~~ Nick Tonkin On Thu, 15 Nov 2001, Jonathan M. Hollin wrote: Hi people, I am currently developing a content management system under mod_perl, with data stored in an RDBMS (MySQL at present, but Oracle on the production server). I would like to add version control to published documents (read pages) and wondered if anyone has any experience of this who would be willing to offer me some advice. I have a CVS server and am curious as to whether there is some way this can used (bearing in mind that I want to manage DB data, not files). I would like to be able to rollback to any previous version (if possible), and would also like to document the different versions themselves. I'm thinking that I could maybe commit the database files to CVS and then use a module to communicate with the CVS server (Apache-CVS, VCP, VCS-CVS, etc). Is this possible? Has anyone ever tried anything like this? I have searched CPAN and used Google to search the web and Usenet but have so far drawn a blank. I suspect that I will not be able to use CVS in this manner and that therefore I am going to have to roll my own. If this does turn out to be case - can anyone lend me any guidance as to how I work out what's changed in a record (between versions)? Then I can just store the changes in a DB as required. Jonathan M. Hollin - WYPUG Co-ordinator West Yorkshire Perl User Group http://wypug.pm.org/
Re: CVS
On Thu, 15 Nov 2001, Jonathan M. Hollin wrote: I am currently developing a content management system under mod_perl, with data stored in an RDBMS (MySQL at present, but Oracle on the production server). I would like to add version control to published documents (read pages) and wondered if anyone has any experience of this who would be willing to offer me some advice. In a previous life I made something like that. I just used an extra table where I stored the RCS data with the revision history. - ask -- ask bjoern hansen, http://ask.netcetera.dk/ !try; do(); more than a billion impressions per week, http://valueclick.com
Re: cvs commit: modperl-site email-etiquette.pod
Hi Stas, On Tue, 23 Oct 2001, Stas Bekman wrote: ssh www.apache.org cd /www/perl.apache.org cvs update -dP Thanks Stas, I'll do index.html later today. 73, Ged.
Re: cvs commit: modperl-site email-etiquette.pod
[EMAIL PROTECTED] wrote: ged 01/10/20 23:50:06 Added: .email-etiquette.pod Log: Revision ChangesPath 1.1 modperl-site/email-etiquette.pod Index: email-etiquette.pod Now Ged, after committing something to modperl-site you always have to remember that there is one more step to do: ssh www.apache.org cd /www/perl.apache.org cvs update -dP Since the site at perl.apache.org is just a checked out version of modperl-site. I've done this for you, but try to do it yourself again to make sure that it works for you. Now update index.html to link to this doc and again update the checked out version. Thanks! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: modperl-2.0/ModPerl-Registry/t .cvsignore
[EMAIL PROTECTED] wrote: stas01/10/17 21:25:12 Modified:ModPerl-Registry/t .cvsignore Added: ModPerl-Registry .cvsignore Log: - cvsignore files Any idea why I don't get the Submitted by: and other commit headers while doing cvs commit under this dir? Philippe has submitted this patch, but I had no place to indicate this. Sorry Philippe _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: modperl-2.0/ModPerl-Registry/t .cvsignore
On Thu, Oct 18, 2001 at 12:35:06PM +0800, Stas Bekman wrote: [EMAIL PROTECTED] wrote: stas01/10/17 21:25:12 Modified:ModPerl-Registry/t .cvsignore Added: ModPerl-Registry .cvsignore Log: - cvsignore files Any idea why I don't get the Submitted by: and other commit headers while doing cvs commit under this dir? Philippe has submitted this patch, but I had no place to indicate this. Sorry Philippe Oh, this is not quite terrible, .cvsignore patch isn't very sexy or important for posterity ! _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/ -- Philippe M. Chiasson [EMAIL PROTECTED] Extropia's Resident System Guru http://www.eXtropia.com/ /* Am I fucking pedantic or what? */ -- Linux2.2.16 /usr/src/linux/drivers/scsi/qlogicpti.h perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/print||$$++redo}' PGP signature
Re: cvs commit: modperl-2.0/ModPerl-Registry/t .cvsignore
Philippe M. Chiasson wrote: On Thu, Oct 18, 2001 at 12:35:06PM +0800, Stas Bekman wrote: [EMAIL PROTECTED] wrote: stas01/10/17 21:25:12 Modified:ModPerl-Registry/t .cvsignore Added: ModPerl-Registry .cvsignore Log: - cvsignore files Any idea why I don't get the Submitted by: and other commit headers while doing cvs commit under this dir? Philippe has submitted this patch, but I had no place to indicate this. Sorry Philippe Oh, this is not quite terrible, .cvsignore patch isn't very sexy or important for posterity ! I know :) But you probably want to get the due credits for your future sexy patches, aren't you :) _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: modperl-2.0/xs/ModPerl/Util ModPerl__Util.h
[EMAIL PROTECTED] wrote: dougm 01/10/08 10:57:45 Added: xs/ModPerl/Util ModPerl__Util.h Log: new module for util functions Revision ChangesPath 1.1 modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h Index: ModPerl__Util.h === static MP_INLINE void mpxs_ModPerl__Util_untaint(pTHX_ I32 items, SV **MARK, SV **SP) { while (MARK = SP) { SvTAINTED_off(*MARK++); } } This hangs in Apache::Registry tests, MARK never gets incremented. This patch fixes things. But I'm interested to know why yours doesn't work? Index: xs/ModPerl/Util/ModPerl__Util.h === RCS file: /home/cvs/modperl-2.0/xs/ModPerl/Util/ModPerl__Util.h,v retrieving revision 1.2 diff -u -r1.2 ModPerl__Util.h --- xs/ModPerl/Util/ModPerl__Util.h 2001/10/08 23:44:17 1.2 +++ xs/ModPerl/Util/ModPerl__Util.h 2001/10/09 04:04:56 @@ -2,7 +2,8 @@ SV **MARK, SV **SP) { while (MARK = SP) { -SvTAINTED_off(*MARK++); +SvTAINTED_off(*MARK); +MARK++; // cannot ++ while in SvTAINTED_off } } -- _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://ticketmaster.com http://apacheweek.com http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
Re: cvs commit: modperl-2.0/todo api.txt
On Fri, 28 Sep 2001, Philippe M . Chiasson wrote: Aie ! There is a slight problem with this patch, as was pointed out by Stas a while ago. Blame it on the annoying TZ lag introduced in e-mail when living in Singapore ;-) This patch works, but doesn't preserve ARRAY context, thus: ok. could probably just pass wantarray to table_get_set and do: return $wantarray ? ($table-get($key)) : scalar $table-get($key)
Re: cvs commit: modperl-2.0/xs/APR/Table APR__Table.h
Thanks, I'll remember that one... aTHX ;-) On Sat, Sep 15, 2001 at 06:21:48PM -, [EMAIL PROTECTED] wrote: dougm 01/09/15 11:21:48 Modified:xs/APR/Table APR__Table.h Log: avoid dTHX; in APR::Table-do Revision ChangesPath 1.2 +7 -3 modperl-2.0/xs/APR/Table/APR__Table.h Index: APR__Table.h === RCS file: /home/cvs/modperl-2.0/xs/APR/Table/APR__Table.h,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- APR__Table.h2001/09/15 18:17:31 1.1 +++ APR__Table.h2001/09/15 18:21:48 1.2 @@ -1,6 +1,7 @@ typedef struct { SV *cv; apr_table_t *filter; /*XXX: or maybe a mgv ? */ +PerlInterpreter *perl; } mpxs_table_do_cb_data_t; typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *); @@ -8,10 +9,10 @@ static int mpxs_apr_table_do_cb(void *data, const char *key, const char *val) { -dTHX; /*XXX*/ +mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data; +dTHXa(tdata-perl); dSP; int rv = 0; -mpxs_table_do_cb_data_t *tdata = (mpxs_table_do_cb_data_t *)data; /* Skip completely if something is wrong */ if (!(tdata tdata-cv key val)) { @@ -56,7 +57,10 @@ tdata.cv = sub; tdata.filter = NULL; - +#ifdef USE_ITHREADS +tdata.perl = aTHX; +#endif + if (items 2) { STRLEN len; tdata.filter = apr_table_make(table-a.pool, items-2); -- Philippe M. Chiasson [EMAIL PROTECTED] Extropia's Resident System Guru http://www.eXtropia.com/ Perl is such a great deal because a lot of people have worked a great deal on it. -- Larry Wall perl -e '$$=\${gozer};{$_=unpack(P26,pack(L,$$));/^Just Another Perl Hacker!\n$/print||$$++redo}' PGP signature
Re: cvs commit: modperl-site/guide download.html
--On 17/07/01 15:16 + [EMAIL PROTECTED] wrote: sbekman 01/07/17 08:16:44 Modified:.distributions.html index.html mod_perl_cvs.html dist .htaccess embperl CVS.pod.1.html guidedownload.html Log: - cvs server has been moved. - /from-cvs has been moved. $ grep -lr from-cvs . | xargs perl -pi -e \ 's|/dev\.apache\.org/from-cvs|cvs.apache.org/snapshots|g' $ grep -lr from-cvs . | xargs perl -pi -e \ 's|/perl\.apache\.org/from-cvs|cvs.apache.org/snapshots|g' your substitution is missing a leading slash, therefore you just turned http:// into http:/ Revision ChangesPath 1.13 +2 -2 modperl-site/distributions.html Index: distributions.html === RCS file: /home/cvs/modperl-site/distributions.html,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- distributions.html 2001/06/10 04:55:43 1.12 +++ distributions.html 2001/07/17 15:16:00 1.13 @@ -14,8 +14,8 @@ LIMaster Source distribution - Release A HREF=http://perl.apache.org/dist; http://perl.apache.org/dist /A, the latest CVS snapshot -A HREF=http://perl.apache.org/from-cvs/; -http://perl.apache.org/from-cvs//A +A HREF=http:/cvs.apache.org/snapshots/ +http:/cvs.apache.org/snapshots//A /LI LI Win32 mod_perl Binaries (made by Randy Kobes) - A 1.82 +1 -1 modperl-site/index.html Index: index.html === RCS file: /home/cvs/modperl-site/index.html,v retrieving revision 1.81 retrieving revision 1.82 diff -u -r1.81 -r1.82 --- index.html 2001/06/24 07:28:19 1.81 +++ index.html 2001/07/17 15:16:03 1.82 @@ -172,7 +172,7 @@ p The latest development a href=mod_perl_cvs.htmlCVS snapshot/a is available from A - HREF=http://perl.apache.org/from-cvs/modperl/;here/A + HREF=http:/cvs.apache.org/snapshots/modperl/here/A (updated every 6 hours) for those who want to live on the edge. /p 1.5 +3 -3 modperl-site/mod_perl_cvs.html Index: mod_perl_cvs.html === RCS file: /home/cvs/modperl-site/mod_perl_cvs.html,v retrieving revision 1.4 retrieving revision 1.5 diff -u -r1.4 -r1.5 --- mod_perl_cvs.html 2000/03/16 20:18:59 1.4 +++ mod_perl_cvs.html 2001/07/17 15:16:05 1.5 @@ -115,13 +115,13 @@ HREF=http://dev.apache.org/anoncvs.txt;http://dev.apache.org/anoncvs .txt/A -DTSTRONGA NAME=item_fromfrom-cvs/A/STRONGDD +DTSTRONGA NAME=item_fromsnapshots/A/STRONGDD P A snapshot is rolled of the modperl tree every 6 hours and placed here: P A -HREF=http://perl.apache.org/from-cvs/modperl/;http://perl.apache.org /from-cvs/modperl//A +HREF=http:/cvs.apache.org/snapshots/modperl/http:/cvs.apache.org/sn apshots/modperl//A P @@ -130,7 +130,7 @@ P A -HREF=http://perl.apache.org/from-cvs/;http://perl.apache.org/from-cv s//A +HREF=http:/cvs.apache.org/snapshots/http:/cvs.apache.org/snapshots/ /A /DL 1.2 +1 -1 modperl-site/dist/.htaccess Index: .htaccess === RCS file: /home/cvs/modperl-site/dist/.htaccess,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- .htaccess 1998/04/26 09:34:38 1.1 +++ .htaccess 2001/07/17 15:16:19 1.2 @@ -1 +1 @@ -Redirect /dist/CVS http://dev.apache.org/from-cvs/modperl +Redirect /dist/CVS http:/cvs.apache.org/snapshots/modperl 1.19 +3 -3 modperl-site/embperl/CVS.pod.1.html Index: CVS.pod.1.html === RCS file: /home/cvs/modperl-site/embperl/CVS.pod.1.html,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- CVS.pod.1.html 2001/02/12 09:18:34 1.18 +++ CVS.pod.1.html 2001/07/17 15:16:26 1.19 @@ -137,7 +137,7 @@ P A -HREF=http://perl.apache.org/from-cvs/embperl/;http://perl.apache.org /from-cvs/embperl//A +HREF=http:/cvs.apache.org/snapshots/embperl/http:/cvs.apache.org/sn apshots/embperl//A P @@ -146,14 +146,14 @@ P A -HREF=http://dev.apache.org/from-cvs/;http://dev.apache.org/from-cvs/ /A +HREF=http:/cvs.apache.org/snapshots/http:/cvs.apache.org/snapshots/ /A P and mod_perl can be found here P A -HREF=http://perl.apache.org/from-cvs/modperl/;http://perl.apache.org /from-cvs/modperl//A +HREF=http:/cvs.apache.org/snapshots/modperl/http:/cvs.apache.org/sn apshots/modperl//A P 1.17 +2 -2
RE: cvs commit: modperl-2.0/Apache-Test/lib/Apache TestConfigPerl.pm
On Mon, 9 Jul 2001, Geoffrey Young wrote: die in modperl_startup.pl if modperl_{inc,extra}.pl die anyway, I thought modperl_extra.pl was supposed to be optional? it is still optional, but if it exists and dies, then mod_perl should propagate that. although, the $@ !~ /^Can.t locate/ is bogus, because it might be that modperl_extra.pl was located, but a module it requires was not.
RE: cvs commit: modperl Changes
-Original Message- From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: 7/6/01 4:33 PM Subject: cvs commit: modperl Changes dougm 01/07/06 13:33:46 Modified:src/modules/perl Apache.xs t/docs startup.pl .Changes Log: add Apache::add_version_component() function hmph... I can't get this to work at all. I read over Doug's original email and it's not what I am finding... a verbose test shows that the test suite is able to set things properly, though so something is going right somewhere, just not for me. maybe this is dependent upon the placement of modules, PerlRequire, etc? --Geoff
RE: cvs commit: modperl/Apache Apache.pm
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Thursday, April 26, 2001 1:31 AM To: [EMAIL PROTECTED] Subject: cvs commit: modperl/Apache Apache.pm dougm 01/04/25 22:30:46 Modified:.Changes Apache Apache.pm Log: fix double-loading bug of Perl{Require,Module}s at startup time hmmm... has anyone else noticed some strange behavior here? it seems that since this patch went in I can't use startup.pl to preload my modules in such a way that my custom directives get seen as well... I mean, that I used to use just use Apache::Dispatch; in a startup.pl and my custom directives would work just fine. now, I get errors unless I use PerlModule Apache::Dispatch maybe I was taking advantage of a feature I shouldn't have been using? --Geoff
Re: cvs commit: modperl/src/modules/perl mod_perl.c
On Wed, 7 Mar 2001, Ask Bjoern Hansen wrote: On 6 Oct 2000 [EMAIL PROTECTED] wrote: dougm 00/10/06 13:18:29 Modified:t/internal error.t src/modules/perl mod_perl.c Log: more for the "Apache::send_http_header was resetting r-status = 200" fix Doug, do you remember what this was about? just that sent_http_header should not modify r-status (I just had a problem with only being able to get redirects from a subrequest to work if I set status == 302 but returned 200 from the handler). you should not modify $r-status and return 302 from the handler.
Re: cvs commit: modperl-2.0/pod modperl_style.pod
On Wed, 17 Jan 2001, Ask Bjoern Hansen wrote: On 2 Jan 2001 [EMAIL PROTECTED] wrote: =item Avoid inherting from certain modules Exporter To void inherting BAutoLoader::AUTOLOAD instead of this: @MyClass::ISA = qw(Exporter); use this: *import = \Exporter::import; Why? To get less obscure error messages for methods that can't be found or are you being really absurd^Wenthusiastic with the memory savings? :) why both, of course!
RE: cvs commit: modperl/src/modules/perl mod_perl.h perl_config.c
pardon my being away, but does this mean that the earlier (possible) fix Apache::ModuleConfig-get($r, __PACKAGE__) was not the cause of the error, or that it was and the __PACKAGE__ part is not necessary now? I was wondering whether to fix my calls for people who weren't up to cvs speed... --Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 22, 2000 2:52 PM To: [EMAIL PROTECTED] Subject: cvs commit: modperl/src/modules/perl mod_perl.h perl_config.c dougm 00/09/22 11:52:04 Modified:.Changes src/modules/perl mod_perl.h perl_config.c Log: plug leak in DIR_MERGE rename mod_perl_cleanup_av - mod_perl_cleanup_sv Revision ChangesPath 1.517 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.516 retrieving revision 1.517 diff -u -r1.516 -r1.517 --- Changes 2000/09/13 07:48:55 1.516 +++ Changes 2000/09/22 18:51:52 1.517 @@ -10,6 +10,8 @@ =item 1.24_01-dev +plug leak in DIR_MERGE, thanks to Matt Sergeant for the spot + fixes to run and pass 'make test' on ActivePerl [Randy Kobes, Gerald Richter] Makefile.PL:post_initialize fix for win32, thanks to john sterling for 1.103 +1 -1 modperl/src/modules/perl/mod_perl.h Index: mod_perl.h === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.h,v retrieving revision 1.102 retrieving revision 1.103 diff -u -r1.102 -r1.103 --- mod_perl.h 2000/08/15 19:36:33 1.102 +++ mod_perl.h 2000/09/22 18:51:59 1.103 @@ -1132,7 +1132,7 @@ void perl_setup_env(request_rec *r); SV *perl_bless_request_rec(request_rec *); void perl_set_request_rec(request_rec *); -void mod_perl_cleanup_av(void *data); +void mod_perl_cleanup_sv(void *data); void mod_perl_cleanup_handler(void *data); void mod_perl_end_cleanup(void *data); void mod_perl_register_cleanup(request_rec *r, SV *sv); 1.102 +18 -11modperl/src/modules/perl/perl_config.c Index: perl_config.c === RCS file: /home/cvs/modperl/src/modules/perl/perl_config.c,v retrieving revision 1.101 retrieving revision 1.102 diff -u -r1.101 -r1.102 --- perl_config.c 2000/08/15 19:36:33 1.101 +++ perl_config.c 2000/09/22 18:52:00 1.102 @@ -436,7 +436,7 @@ sva = newSVpv(arg,0); if(!*cmd) { *cmd = newAV(); - register_cleanup(p, (void*)*cmd, mod_perl_cleanup_av, mod_perl_noop); + register_cleanup(p, (void*)*cmd, mod_perl_cleanup_sv, mod_perl_noop); MP_TRACE_d(fprintf(stderr, "init `%s' stack\n", hook)); } MP_TRACE_d(fprintf(stderr, "perl_cmd_push_handlers: @%s, '%s'\n", hook, arg)); @@ -823,13 +823,13 @@ return NULL; } -void mod_perl_cleanup_av(void *data) +void mod_perl_cleanup_sv(void *data) { -AV *av = (AV*)data; -if(SvREFCNT((SV*)av)) { - MP_TRACE_g(fprintf(stderr, "cleanup_av: SvREFCNT(0x%lx)==%d\n", - (unsigned long)av, (int)SvREFCNT((SV*)av))); - SvREFCNT_dec((SV*)av); +SV *sv = (SV*)data; +if (SvREFCNT(sv)) { +MP_TRACE_g(fprintf(stderr, "cleanup_sv: SvREFCNT(0x%lx)==%d\n", + (unsigned long)sv, (int)SvREFCNT(sv))); +SvREFCNT_dec(sv); } } @@ -929,7 +929,7 @@ *basevp = (mod_perl_perl_dir_config *)basev, *addvp = (mod_perl_perl_dir_config *)addv; -SV *sv, +SV *sv=Nullsv, *basesv = basevp ? basevp-obj : Nullsv, *addsv = addvp ? addvp-obj : Nullsv; @@ -958,16 +958,23 @@ if((perl_eval_ok(NULL) == OK) (count == 1)) { sv = POPs; ++SvREFCNT(sv); - mrg-obj = sv; mrg-pclass = SvCLASS(sv); } PUTBACK; FREETMPS;LEAVE; } else { - mrg-obj = newSVsv(basesv); - mrg-pclass = basevp-pclass; +sv = newSVsv(basesv); +mrg-pclass = basevp-pclass; } + +if (sv) { +mrg-obj = sv; +register_cleanup(p, (void*)mrg, + perl_perl_cmd_cleanup, mod_perl_noop); + +} + return (void *)mrg; }
RE: cvs commit: modperl/src/modules/perl mod_perl.c
the mod_perl.c update is causing conficts with the set_handlers patch... the patch works, albit with lots of fuzz, but make yields: mod_perl.c: In function `perl_run_stacked_handlers': mod_perl.c:1342: parse error before `register' make[3]: *** [mod_perl.o] Error 1 make[2]: *** [all] Error 1 make[1]: *** [subdirs] Error 1 make[1]: Leaving directory `/usr/src/apache_1.3.12/src' make: *** [apache_httpd] Error 2 just in case you want to issue a new patch :) --Geoff -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] Sent: Friday, September 01, 2000 1:16 AM To: [EMAIL PROTECTED] Subject: cvs commit: modperl/src/modules/perl mod_perl.c dougm 00/08/31 22:15:42 Modified:.Changes Leak Leak.xs src/modules/perl mod_perl.c Log: fixes for ActivePerl Revision ChangesPath 1.513 +2 -0 modperl/Changes Index: Changes === RCS file: /home/cvs/modperl/Changes,v retrieving revision 1.512 retrieving revision 1.513 diff -u -r1.512 -r1.513 --- Changes 2000/09/01 05:10:09 1.512 +++ Changes 2000/09/01 05:15:37 1.513 @@ -10,6 +10,8 @@ =item 1.24_01-dev +fixes for ActivePerl [Gurusamy Sarathy [EMAIL PROTECTED]] + change apaci/Makefile.tmpl and src/modules/perl/Makefile so Perl's include path comes before /usr/local/include, e.g. to make sure Perl's patchlevel.h is used, thanks to Ryan Morgan for the spot 1.4 +1 -1 modperl/Leak/Leak.xs Index: Leak.xs === RCS file: /home/cvs/modperl/Leak/Leak.xs,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- Leak.xs 1999/11/15 20:05:27 1.3 +++ Leak.xs 2000/09/01 05:15:40 1.4 @@ -121,7 +121,7 @@ { char *state = lookup((struct hash_s **)p, sv, t_new); if (state != t_old) { - fprintf(stderr, "%s %p : ", state ? state : t_new, sv); + PerlIO_printf(PerlIO_stderr(), "%s %p : ", state ? state : t_new, sv); sv_dump(sv); } return hwm+1; 1.125 +21 -2 modperl/src/modules/perl/mod_perl.c Index: mod_perl.c === RCS file: /home/cvs/modperl/src/modules/perl/mod_perl.c,v retrieving revision 1.124 retrieving revision 1.125 diff -u -r1.124 -r1.125 --- mod_perl.c 2000/08/15 19:36:33 1.124 +++ mod_perl.c 2000/09/01 05:15:41 1.125 @@ -850,10 +850,21 @@ dPPDIR; dPPREQ; dTHR; -GV *gv = gv_fetchpv("SIG", TRUE, SVt_PVHV); +GV *gv; + +#ifdef USE_ITHREADS +dTHX; + +if (!aTHX) { + PERL_SET_CONTEXT(perl); +} +#endif (void)acquire_mutex(mod_perl_mutex); - + +gv = gv_fetchpv("SIG", TRUE, SVt_PVHV); + + #if 0 /* force 'PerlSendHeader On' for sub-requests * e.g. Apache::Sandwich @@ -1299,6 +1310,14 @@ I32 i, do_clear=FALSE; SV *sub, **svp; int hook_len = strlen(hook); + +#ifdef USE_ITHREADS +dTHX; + +if (!aTHX) { + PERL_SET_CONTEXT(perl); +} +#endif if(handlers == Nullav) { if(hv_exists(stacked_handlers, hook, hook_len)) {
Re: cvs snapshots
On Thu, 17 Aug 2000, Eric Cholet wrote: We no longer have cvs snapshots in http://dev.apache.org/from-cvs/ There's only httpd in there. (we link to this from http://perl.apache.org/distributions.html) i guess we should change it to: http://perl.apache.org/from-cvs/
Re: cvs commit: modperl/src/modules/perl Apache.xs
On Mon, 14 Aug 2000, brian moseley wrote: On 15 Aug 2000 [EMAIL PROTECTED] wrote: Log: fix $r-args(undef) speaking of which... does $r-args handle multiple args with the same name correctly? the docs imply that it doesn't. i haven't tried it myself to see. what do you mean? args in or out? $r-args($string) just does a blind copy. @args = $r-args just splits on ,=, it's up to the caller to deal with multiple args of the same name. if i'm using Apache::Request, does setting a param get translated back down into $r-args? prolly not huh. nope. i recently had the situation in webmail where i had to unescape, utf8-encode, and re-escape each param value, and then reformulate the query string. would have been cool if i could have just stepped through $r-param and set the values for each param, and then used $r-args at the very end. yeah, i think i had to do something like that in webmail/calendar, there might even be a comment like #should add something like this to libapreq just haven't got around to it yet ;-/
Re: cvs commit: modperl/src/modules/perl Apache.xs
On Tue, 15 Aug 2000, Doug MacEachern wrote: what do you mean? args in or out? $r-args($string) just does a blind copy. @args = $r-args just splits on ,=, it's up to the caller to deal with multiple args of the same name. hm. what about %args = $r-args? won't that give me only the last arg value? i suppose i should just do @args = $r-args. thanks for the reminder.
Re: cvs commit: modperl/src/modules/perl Apache.xs
On Tue, 15 Aug 2000, brian moseley wrote: hm. what about %args = $r-args? won't that give me only the last arg value? i suppose i should just do @args = $r-args. thanks for the reminder. yeah.
Re: cvs commit: modperl/src/modules/perl Apache.xs
On Tue, 15 Aug 2000, brian moseley wrote: On Tue, 15 Aug 2000, Doug MacEachern wrote: what do you mean? args in or out? $r-args($string) just does a blind copy. @args = $r-args just splits on ,=, it's up to the caller to deal with multiple args of the same name. hm. what about %args = $r-args? won't that give me only the last arg value? then the caller isn't dealing with it. ;-) (or he is, but as you said ...) i suppose i should just do @args = $r-args. thanks for the reminder. - ask -- ask bjoern hansen - http://www.netcetera.dk/~ask/ more than 70M impressions per day, http://valueclick.com
Re: cvs commit: modperl/src/modules/perl Apache.xs
On 15 Aug 2000 [EMAIL PROTECTED] wrote: Log: fix $r-args(undef) speaking of which... does $r-args handle multiple args with the same name correctly? the docs imply that it doesn't. i haven't tried it myself to see. if i'm using Apache::Request, does setting a param get translated back down into $r-args? prolly not huh. i recently had the situation in webmail where i had to unescape, utf8-encode, and re-escape each param value, and then reformulate the query string. would have been cool if i could have just stepped through $r-param and set the values for each param, and then used $r-args at the very end.
Re: cvs commit: modperl/src/modules/perl mod_perl.c
On Sat, Jun 03, 2000 at 01:57:26PM -0700, Ask Bjoern Hansen wrote: On 2 Jun 2000 [EMAIL PROTECTED] wrote: Modified:src/modules/perl mod_perl.c Log: fix segfault Don't forget to update Changes. I need some help explaining this change. Here's what happened: % cat t/docs/Foo.pm package foo; sub handler { warn 'foo' } 1; notice the typo, the package declaration says 'foo' instead of 'Foo' % cat t/conf/httpd.conf Location /foo PerlHandler Foo SetHandler perl-script /Location GET /foo will trigger the segfault. Well, under 5.00502 it does, but under 5.6 I get an (expected) 500 internal server error. -- Eric Cholet
Re: cvs commit: modperl-site index.html
On Fri, 12 May 2000, Stas Bekman wrote: The only concern is to have all the pages designed in the same way and not only the the front page. Hmm, at least to arrange a link back to the front page :) yah, i think he originally wanted to make sure folks were happy with the design before he did a bunch more work. i'll ping jim again to see where he's at with the work.
Re: cvs commit: modperl-2.0/lib/ModPerl Code.pm
On Fri, 14 Apr 2000, Doug MacEachern wrote: Orwant and friends in "Algorithms with Perl" page 28 claims the first form is slower. faster to *parse*, not faster to *run*. stas, your benchmarks don't test parse time. The only question I still want to ask you is why do we care about the parse time, when mod_perl is a preloaded and precompiled. If nothing should be parsed at the *run time*, why it's important to work on the *parse time*. I understand that it will make a server start and restart faster. Anything else that I've missed? Thanks a lot! __ Stas Bekman | JAm_pH--Just Another mod_perl Hacker http://stason.org/ | mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] | http://perl.orghttp://stason.org/TULARC/ http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org --
Re: cvs commit: modperl-2.0/lib/ModPerl Code.pm
On Sat, 15 Apr 2000, Doug MacEachern wrote: that is sad. consider PerlFreshRestart and graceful restart. it doesn't take much effort to type '' instead of "". it might not make that much of a difference in parse time, but it doesn't hurt either. can we please drop this topic, there's plenty more important things to worry about. if you don't watch it i'm going to start questioning where you put your curly braces.
Re: cvs commit: modperl-2.0/lib/ModPerl Code.pm
At 11:56 AM 04/14/00 +0300, Stas Bekman wrote: sticking to the convention of single quoting constant strings Why? You lose the interpolation feature when you need it and you get to the awkward statement like this: -print $h_fh "\n#define ", +print $h_fh "\n", '#define ', Orwant and friends in "Algorithms with Perl" page 28 claims the first form is slower. Bill Moseley mailto:[EMAIL PROTECTED]
Re: cvs commit: modperl-2.0/lib/ModPerl Code.pm
Orwant and friends in "Algorithms with Perl" page 28 claims the first form is slower. faster to *parse*, not faster to *run*. stas, your benchmarks don't test parse time. It seems that TIMTOWTDI is going to die soon as everybody tells me that I should code as shown in "OO Perl" and ""Algorithms with Perl" :( The books are cool, but why turning them into bibles? The book authors are great, but why rising them into gods? bibles? gods? i haven't touched either of these books. i'm using '' vs. "" because '' is faster for Perl to parse and faster for me to parse. i'm thinking about string usage more, rather than just slinging them around without a care. i'm trying to avoid interpolation, which turns into concatination, which uses more memory and is slower than using a list. if i see a '' string, i don't worry, if i see "", i want to look close and thing about how expensive it will turn out to be. there will be exceptions, like "\n", ' define' vs "\ndefine", i do prefer the later for readability. in fact, there's plenty of interpolation happening in those modules, i very much value readability, and the "\n", ' define' did make me cringe a bit. and i will probably change that one back. and, your benchmark of those shows "\ndefine" to be faster, because the string being copied is so tiny, it's less expensive than pushing an extra item onto the stack. when generating webpages, we generally don't deal with such tiny strings, do we? use Benchmark; open my $fh, '', '/dev/null'; my($one, $two, $three, $four) = map { $_ x 1000 } 'a'..'d'; timethese(300_000, { concat = sub { print $fh "$one$two$three$four"; }, list = sub { print $fh $one, $two, $three, $four; }, }); Benchmark: timing 30 iterations of concat, list... concat: 12 wallclock secs (10.83 usr + 0.67 sys = 11.50 CPU) @ 26086.96/s (n=30) list: 9 wallclock secs ( 6.75 usr + 0.59 sys = 7.34 CPU) @ 40871.93/s (n=30)
Re: cvs commit: modperl-2.0/lib/ModPerl Code.pm
On Fri, 14 Apr 2000, Doug MacEachern wrote: Orwant and friends in "Algorithms with Perl" page 28 claims the first form is slower. faster to *parse*, not faster to *run*. stas, your benchmarks don't test parse time. It seems that TIMTOWTDI is going to die soon as everybody tells me that I should code as shown in "OO Perl" and ""Algorithms with Perl" :( The books are cool, but why turning them into bibles? The book authors are great, but why rising them into gods? bibles? gods? i haven't touched either of these books. i'm using '' vs. "" because '' is faster for Perl to parse and faster for me to parse. i'm thinking about string usage more, rather than just slinging them around without a care. i'm trying to avoid interpolation, which turns into concatination, which uses more memory and is slower than using a list. if i see a '' string, i don't worry, if i see "", i want to look close and thing about how expensive it will turn out to be. there will be exceptions, like "\n", ' define' vs "\ndefine", i do prefer the later for readability. in fact, there's plenty of interpolation happening in those modules, i very much value readability, and the "\n", ' define' did make me cringe a bit. and i will probably change that one back. and, your benchmark of those shows "\ndefine" to be faster, because the string being copied is so tiny, it's less expensive than pushing an extra item onto the stack. when generating webpages, we generally don't deal with such tiny strings, do we? use Benchmark; open my $fh, '', '/dev/null'; my($one, $two, $three, $four) = map { $_ x 1000 } 'a'..'d'; timethese(300_000, { concat = sub { print $fh "$one$two$three$four"; }, list = sub { print $fh $one, $two, $three, $four; }, }); Benchmark: timing 30 iterations of concat, list... concat: 12 wallclock secs (10.83 usr + 0.67 sys = 11.50 CPU) @ 26086.96/s (n=30) list: 9 wallclock secs ( 6.75 usr + 0.59 sys = 7.34 CPU) @ 40871.93/s (n=30) Doug, you are my man :) That's the explanation I was looking for! Thanks a lot! P.S. I'm sending a few more benchmarks to the list now :) Apache::Request rules!!! __ Stas Bekman | JAm_pH--Just Another mod_perl Hacker http://stason.org/ | mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] | http://perl.orghttp://stason.org/TULARC/ http://singlesheaven.com| http://perlmonth.com http://sourcegarden.org --
Re: cvs commit: modperl/src/modules/perl Connection.xs
On 11 Apr 2000 [EMAIL PROTECTED] wrote: Log: $c-remote_ip($ip) now also sets conn-remote_addr to make IP-based access control work correctly ahfdkjah! Thanks. That have driven me nuts. It never occured to me that it was a bug and not me being clueless though. :) You're my hero of the day. - ask -- ask bjoern hansen - http://www.netcetera.dk/~ask/ more than 70M impressions per day, http://valueclick.com