In module require configuration file
Hi all: In mod-perl,my module (mymodule.pm) will read config var from a file ( require conf.pm).I put the require in my new() function. In one instance,they will work well. But ,I will run two or more instance (the two conf.pm is different.),the mymodule.pm will have error.Because it require conf.pm and maybe get other conf.pm. I am test false in redhat 7,the apache is 1.3.14 and mod-perl is 1.24. And re-compile apache 1.3.20 and mod-perl 1.25,and test false also. But I am test in Mandrake 8 ,the apache is 1.3.19 and mod-perl is 1.25.The two instance has worked! I wonder,why redhat un-support two instance and Mandrake is well? Thanks and sorry for my english. The sample code: = #!/usr/bin/perl # mymodule.pm Package mymodule; sub new { my $type = shift; my $self = {}; require ./conf.pm; bless $self,$type; } = #!/usr/bin/perl # conf.pm # configuration file one package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } #!/usr/bin/perl # conf.pm # configuration file two package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } = #!/usr/bin/perl # mycgi.pl use mymodule; my $m = mymodule-new(); print $conf::conf-{'web_name'}; ==
Re: Getting the wrong URL
On 1 Jun 2001, [EMAIL PROTECTED] wrote: OK, I think I have solved this problem, but I would like to run my solution by you folks, and see if it makes any sense. What we found, on a more thorough code review, was that a number of the handlers were doing a redirect by calling send_cgi_header, and then exit()'ing. It seemed to us that the exit would kill the Perl interp, and the Apache child would then just keep serving whatever it had in its buffer at the time. Does that make any sense? If so, will die() have the same results? I started grepping for exit everywhere, and removed it, but along the way I saw a number of places that we're calling die. I don't think it makes any sense. Also you could look at the handlers running for each request using Apache::ShowRequest. I think it's mentioned somewhere in the guide too. I expect that this is just a really stupid newbie problem - I've only been doing mod_perl stuff for about 6 months or so. And, in fact, once it occurred to me that this might be the problem, of course I found it in the FAQ. -- Rich Bowen - Author - Apache Server Unleashed http://www.apacheunleashed.com/ _ Stas Bekman JAm_pH -- Just Another mod_perl Hacker http://stason.org/ mod_perl Guide http://perl.apache.org/guide mailto:[EMAIL PROTECTED] http://apachetoday.com http://eXtropia.com/ http://singlesheaven.com http://perl.apache.org http://perlmonth.com/
ANNOUNCE: AxKit 1.4 (fwd)
Finally out of beta!!! The next stable release of AxKit is now available for download. This is a major release, fixing many bugs, improving functionality, performance, and flexibility. There is another major update to XSP functionality, and all taglibs have been released to CPAN updated to the new XSP API. Also added is a new TaglibHelper module, which makes writing taglibs as easy as writing a perl module with Exporter-like tag specifications. Changes in detail: - Config directives no longer implemented by Apache::ExtUtils - New TaglibHelper module, makes writing XSP taglibs almost trivial. - Build checks for iconv library - should make things smoother on *BSD - Known bug in Filter provider is fixed - Major memory leak cleanup - Added LibXSLT language module (for use with XML::LibXSLT). This is over twice as fast as XML::Sablotron, and more compliant. - Added AxAddURIProcessor config directive - Added AxLogDeclines config directive (replaces PerlSetVar equivalent) - Added import_templates() to XPathScript - XSP now uses SAX to generate code - Sablot.pm allows you to set the outgoing mime type - Many fixes to AxKit.xs compiled directives (hopefully making it work for more people now) - Removed eval{} stuff around XML parsing in Provider.pm as it seemed to be causing segfaults in Perl 5.6.1 - Fixes to LibXSLT language module to make it work with new versions of XML::LibXSLT (and the core libxslt library). - Cleaned up error handling, and error stylesheets significantly - Removed Storable from XPathScript (to get control of the segfaults) - Implemented has_changed() for all cache bits - Improved error handling with an AxStackTrace config directive allowing the Error Stylesheet to get a full stack trace. - Doc fixes to stop pod2man complaining. - AxKit now adds AxKit/Version to your Server string (for netcraft!) - Switched xml_string to pnotes so you can have binary nulls in the output (e.g. for PDFs). - Added some configuration tidbits to INSTALL - Much better (though not 100% there) test harness code - Major fixes to Makefile.PL (to work better on *BSD and Win32) - XML::Parser no longer needed if you have libxml2 installed. This will allow AxKit to work with Apaches that have expat enabled! - XSP pages can implement a has_changed() function, which allows you to control the caching of the results (can have significant performance increases on dynamic pages) - Providers responsible for returning declined (this allows for non-file providers to not end up in a 404 when doing e.g. passthru) - Added AxNoCache option to turn off caching on purpose. - split AxKit.xs into more managable files - Better error messages from CharsetConv (iconv) - Added a PDF slideshow builder called AxPoint - Sablot fix for changing content-type. - Much cleaner handling of character set conversions - AxKit::Apache-request() added (similar to Apache-request()) - Cache maintains content-type more sanely. - Many, many minor bug fixes. Many people are to thank for making this release a reality. I won't mention names as I'll forget someone. You know who you are. Enjoy! -- Matt/ /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\ - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: ANNOUNCE: AxKit 1.4 (fwd)
On Tue, 5 Jun 2001, Matt Sergeant wrote: Finally out of beta!!! The next stable release of AxKit is now available for download. This is a major release, fixing many bugs, improving functionality, performance, and flexibility. There is another major update to XSP functionality, and all taglibs have been released to CPAN updated to the new XSP API. Also added is a new TaglibHelper module, which makes writing taglibs as easy as writing a perl module with Exporter-like tag specifications. D'Oh!, in the excitement I forgot a URL... http://axkit.org/ http://axkit.org/download/AxKit-1.4.tar.gz -- Matt/ /||** Founder and CTO ** ** http://axkit.com/ ** //||** AxKit.com Ltd ** ** XML Application Serving ** // ||** http://axkit.org ** ** XSLT, XPathScript, XSP ** // \\| // ** mod_perl news and resources: http://take23.org ** \\// //\\ // \\
looking for cited document WRT web testers
I hope I'm not barking up the wrong tree, but I could not find this in the archive. I could have _sworn_ that within the last several weeks, someone had posted here a URL to a document that described, in a handy way, information for web testers WRT the sorts of details they really need to supply to the developers to be useful. Ie. 'the web page gives me errors' is inadequate; real details are needed (browser version, what actions were taken, etc.). (The document in question actually gave some background info as to why the details are helpful...) Does anyone know what I'm talking about? Even if you can't recall such post to this list, a recommendation of such a document would be welcome. I know the details myself, and could write such a document, but this author had done a good job... Feel free to reply to me off-list, if you don't want to clog everyone's mailboxes... -- Brian 'you Bastard' Reichert[EMAIL PROTECTED] 37 Crystal Ave. #303Daytime number: (603) 434-6842 Derry NH 03038-1713 USA Intel architecture: the left-hand path
Practical examples of mod_perl Method handlers?
Are there any CPAN modules for Apache that are examples of writing a method handler? The docs in the manpage, the book, and the mod_perl guide are pretty much all the same (brief) text. A good example would help a great deal. Thanks. Randy -- --- Randy J. Ray | Buy a copy of a baby naming book and you'll never be at a [EMAIL PROTECTED] | loss for variable names. Fred is a wonderful name, and easy +1 408 543-9482 | to type. --Roedy Green, How To Write Unmaintainable Code
The forbidden question...
Hello mod_perl gurus, Unfortunately, I guess it's time for me to get off the list for a while. Not enough time during my busy season to devote to getting my mod_perl application working. Maybe once the snow flies again I've tried twice to sign off but to no avail. I'm going to have to ask the forbidden question--how does one unsubscribe? Preferably, a URL so I can avoid being castigated... :-) Andrew Lietzow #1 Plantsman at http://HostaHaven.com 1250 41st Street Des Moines, IA 50311-2516 The ACL Group, Inc. mailto:[EMAIL PROTECTED]
Re: Practical examples of mod_perl Method handlers?
[EMAIL PROTECTED] (Randy J. Ray) wrote: Are there any CPAN modules for Apache that are examples of writing a method handler? The docs in the manpage, the book, and the mod_perl guide are pretty much all the same (brief) text. A good example would help a great deal. Thanks. Apache::AuthCookie uses method handlers. Several subclasses of it also exist, like Apache::AuthTicket, Apache::AuthCookieDBI, and whatever DIY module you build to use AuthCookie itself. ------ Ken Williams Last Bastion of Euclidity [EMAIL PROTECTED]The Math Forum
: In module require configuration file
Sorry.I find ,require different configuration file in module is impossibility. Have a mistake ,my mandrake box run in cgi environment as a result of apache configure. So ,in mod-perl,I dont find any way require different configuration. -ÔʼÓʼþ- ·¢¼þÈË: Wang Xingyu ÍõÐËÓî [ÉϺ£] ·¢ËÍʱ¼ä: 2001Äê6ÔÂ5ÈÕ 15:22 ÊÕ¼þÈË: [EMAIL PROTECTED] Ö÷Ìâ: In module require configuration file Hi all: In mod-perl,my module (mymodule.pm) will read config var from a file ( require conf.pm).I put the require in my new() function. In one instance,they will work well. But ,I will run two or more instance (the two conf.pm is different.),the mymodule.pm will have error.Because it require conf.pm and maybe get other conf.pm. I am test false in redhat 7,the apache is 1.3.14 and mod-perl is 1.24. And re-compile apache 1.3.20 and mod-perl 1.25,and test false also. But I am test in Mandrake 8 ,the apache is 1.3.19 and mod-perl is 1.25.The two instance has worked! I wonder,why redhat un-support two instance and Mandrake is well? Thanks and sorry for my english. The sample code: = #!/usr/bin/perl # mymodule.pm Package mymodule; sub new { my $type = shift; my $self = {}; require ./conf.pm; bless $self,$type; } = #!/usr/bin/perl # conf.pm # configuration file one package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } #!/usr/bin/perl # conf.pm # configuration file two package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } = #!/usr/bin/perl # mycgi.pl use mymodule; my $m = mymodule-new(); print $conf::conf-{'web_name'}; ==
Re: : In module require configuration file
You could declare different package names and call the config variables explicitly: see http://perl.apache.org/guide/porting.html#Configuration_Files_Writing_Dy - Original Message - From: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED] To: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 9:15 PM Subject: ´ð¸´: In module require configuration file Sorry.I find ,require different configuration file in module is impossibility. Have a mistake ,my mandrake box run in cgi environment as a result of apache configure. So ,in mod-perl,I dont find any way require different configuration. -?-¨º?¨®¨º?t- ¡¤¡é?t¨¨?: Wang Xingyu ¨ª?D?¨®? [¨¦?o¡ê] ¡¤¡é?¨ª¨º¡À??: 2001?¨º6??5¨¨? 15:22 ¨º??t¨¨?: [EMAIL PROTECTED] ?¡Â¨¬a: In module require configuration file Hi all: In mod-perl,my module (mymodule.pm) will read config var from a file ( require conf.pm).I put the require in my new() function. In one instance,they will work well. But ,I will run two or more instance (the two conf.pm is different.),the mymodule.pm will have error.Because it require conf.pm and maybe get other conf.pm. I am test false in redhat 7,the apache is 1.3.14 and mod-perl is 1.24. And re-compile apache 1.3.20 and mod-perl 1.25,and test false also. But I am test in Mandrake 8 ,the apache is 1.3.19 and mod-perl is 1.25.The two instance has worked! I wonder,why redhat un-support two instance and Mandrake is well? Thanks and sorry for my english. The sample code: = #!/usr/bin/perl # mymodule.pm Package mymodule; sub new { my $type = shift; my $self = {}; require ./conf.pm; bless $self,$type; } = #!/usr/bin/perl # conf.pm # configuration file one package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } #!/usr/bin/perl # conf.pm # configuration file two package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } = #!/usr/bin/perl # mycgi.pl use mymodule; my $m = mymodule-new(); print $conf::conf-{'web_name'}; ==
Re: ´ð¸´: In module require configuration file [frig]
typos, sorry. Damned cut and paste Jamie LeTual wrote: How about this: #=== mymodule.pm = package mymodule; use strict; sub new { my $type = shift; my $conf = shift; my $self = { conf = require $conf }; bless $self, $type; return $self; } 1; #=== conf.pl = { web_name = 'foo.com' }; - #=== conf.pm = + #=== somefile.pl = #!/usr/bin/perl use strict; use Data::Dumper; use mymodule; - my $m = mymodule-new('conf.pm'); + my $m = mymodule-new('conf.pl'); print Dumper($m); ... -- -[sent from home]--- | Jamie LeTual |Email : [EMAIL PROTECTED] | | Programmeur Errant |Phone : (514) 523-0940 | | |PGP : http://people.hbe.ca/~jamie | |__||
Re: : In module require configuration file
and also http:// thingy.kcilink.com/modperlguide/perl/Using_Non_Hardcoded_Configuratio.html - Original Message - From: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED] To: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 9:15 PM Subject: ´ð¸´: In module require configuration file Sorry.I find ,require different configuration file in module is impossibility. Have a mistake ,my mandrake box run in cgi environment as a result of apache configure. So ,in mod-perl,I dont find any way require different configuration. -?-¨º?¨®¨º?t- ¡¤¡é?t¨¨?: Wang Xingyu ¨ª?D?¨®? [¨¦?o¡ê] ¡¤¡é?¨ª¨º¡À??: 2001?¨º6??5¨¨? 15:22 ¨º??t¨¨?: [EMAIL PROTECTED] ?¡Â¨¬a: In module require configuration file Hi all: In mod-perl,my module (mymodule.pm) will read config var from a file ( require conf.pm).I put the require in my new() function. In one instance,they will work well. But ,I will run two or more instance (the two conf.pm is different.),the mymodule.pm will have error.Because it require conf.pm and maybe get other conf.pm. I am test false in redhat 7,the apache is 1.3.14 and mod-perl is 1.24. And re-compile apache 1.3.20 and mod-perl 1.25,and test false also. But I am test in Mandrake 8 ,the apache is 1.3.19 and mod-perl is 1.25.The two instance has worked! I wonder,why redhat un-support two instance and Mandrake is well? Thanks and sorry for my english. The sample code: = #!/usr/bin/perl # mymodule.pm Package mymodule; sub new { my $type = shift; my $self = {}; require ./conf.pm; bless $self,$type; } = #!/usr/bin/perl # conf.pm # configuration file one package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } #!/usr/bin/perl # conf.pm # configuration file two package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } = #!/usr/bin/perl # mycgi.pl use mymodule; my $m = mymodule-new(); print $conf::conf-{'web_name'}; ==
: e?: In module require configuration file [frig]
TKS, Why use Data::Dumper ? -原始邮件- 发件人: Jamie LeTual [mailto:[EMAIL PROTECTED]] 发送时间: 2001年6月6日 11:53 收件人: Wang Xingyu íõÐËóî [éϺ£]; [EMAIL PROTECTED] 主题: Re: ′e?′: In module require configuration file [frig] typos, sorry. Damned cut and paste Jamie LeTual wrote: How about this: #=== mymodule.pm = package mymodule; use strict; sub new { my $type = shift; my $conf = shift; my $self = { conf = require $conf }; bless $self, $type; return $self; } 1; #=== conf.pl = { web_name = 'foo.com' }; - #=== conf.pm = + #=== somefile.pl = #!/usr/bin/perl use strict; use Data::Dumper; use mymodule; - my $m = mymodule-new('conf.pm'); + my $m = mymodule-new('conf.pl'); print Dumper($m); ... -- -[sent from home]--- | Jamie LeTual |Email : [EMAIL PROTECTED] | | Programmeur Errant |Phone : (514) 523-0940 | | |PGP : http://people.hbe.ca/~jamie | |__||
: : In module require configuration file
Maybe I should use ''PerlSetVar''. I will think it. -ÔʼÓʼþ- ·¢¼þÈË: Mike Christine [mailto:[EMAIL PROTECTED]] ·¢ËÍʱ¼ä: 2001Äê6ÔÂ6ÈÕ 11:49 ÊÕ¼þÈË: Wang Xingyu ÍõÐËÓî [ÉϺ£]; [EMAIL PROTECTED] Ö÷Ìâ: Re: ´ð¸´: In module require configuration file and also http:// thingy.kcilink.com/modperlguide/perl/Using_Non_Hardcoded_Confi guratio.html - Original Message - From: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED] To: Wang Xingyu ÍõÐËÓî [ÉϺ£] [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Tuesday, June 05, 2001 9:15 PM Subject: ´ð¸´: In module require configuration file Sorry.I find ,require different configuration file in module is impossibility. Have a mistake ,my mandrake box run in cgi environment as a result of apache configure. So ,in mod-perl,I dont find any way require different configuration. -?-¨º?¨®¨º?t- ¡¤¡é?t¨¨?: Wang Xingyu ¨ª?D?¨®? [¨¦?o¡ê] ¡¤¡é?¨ª¨º¡À??: 2001?¨º6??5¨¨? 15:22 ¨º??t¨¨?: [EMAIL PROTECTED] ?¡Â¨¬a: In module require configuration file Hi all: In mod-perl,my module (mymodule.pm) will read config var from a file ( require conf.pm).I put the require in my new() function. In one instance,they will work well. But ,I will run two or more instance (the two conf.pm is different.),the mymodule.pm will have error.Because it require conf.pm and maybe get other conf.pm. I am test false in redhat 7,the apache is 1.3.14 and mod-perl is 1.24. And re-compile apache 1.3.20 and mod-perl 1.25,and test false also. But I am test in Mandrake 8 ,the apache is 1.3.19 and mod-perl is 1.25.The two instance has worked! I wonder,why redhat un-support two instance and Mandrake is well? Thanks and sorry for my english. The sample code: = #!/usr/bin/perl # mymodule.pm Package mymodule; sub new { my $type = shift; my $self = {}; require ./conf.pm; bless $self,$type; } = #!/usr/bin/perl # conf.pm # configuration file one package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } #!/usr/bin/perl # conf.pm # configuration file two package conf; use strict; use vars qw($conf); # defined configure variable $conf = { # web name. 'web_name' = 'foo.com', } = #!/usr/bin/perl # mycgi.pl use mymodule; my $m = mymodule-new(); print $conf::conf-{'web_name'}; ==
ANNOUNCE: HTTP::Webdav - Perl interface to Neon HTTP and WebDAV client library
This is the Perl interface to the neon HTTP and WebDAV client library. Also not strictly related to mod_perl, I think it would be interesting for the people here. It can be downloaded from ftp://ftp.dev.ecos.de/pub/perl/webdav/HTTP-Webdav-0.1.10-0.15.0.tar.gz neon has the following features: - High-level interface to HTTP and WebDAV methods (PUT, GET, HEAD etc) - Low-level interface to HTTP request handling, to allow implementing new methods easily. - HTTP/1.1 and HTTP/1.0 persistent connections - RFC2617 basic and digest authentication (including auth-int, md5-sess) - Proxy support (including basic/digest authentication) - Generic WebDAV 207 XML response handling mechanism - XML parsing using the expat or libxml parsers - Easy generation of error messages from 207 error responses - WebDAV resource manipulation: MOVE, COPY, DELETE, MKCOL. - WebDAV metadata support: set and remove properties, query any set of properties (PROPPATCH/PROPFIND). WARNING: This wrapper is alpha code, while neon is around for some time and stable to use, not all of the interface functions provided by this Perl module has been tested extensivly, but most of them should work without problems (At least they do it for me :-). Enjoy Gerald - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 -
ANNOUNCE: HTML::Embperl 1.3.3
The URL ftp://ftp.dev.ecos.de/pub/perl/embperl/HTML-Embperl-1.3.3.tar.gz has entered CPAN as file: $CPAN/authors/id/G/GR/GRICHTER/HTML-Embperl-1.3.3.tar.gz size: 345235 bytes md5: f2a4579210f7797e1ff4d756f3b7e037 Embperl 1.3.2 is current stable version and this release contains mainly bugfixes and a few enhancements. Development of new features is going on in Embperl 2.0 for which I expect to release 2.0b3 in a few days. Embperl is a system for building dynamic websites with Perl. It gives you the power to embed Perl code in your HTML documents and the ability to build your Web site out of small reusable objects in an object-oriented style. You can also take advantage of all the usual Perl modules, (including DBI for database access) use their functionality and easily include their output in your web pages. Embperl has several features which are especially useful for creating HTML, including dynamic tables, form field processing, URL escaping/unescaping, session handling, and more. See http://perl.apache.org/embperl/ (english) or http://www.ecos.de/embperl/ (german) for more information. Enjoy Gerald Changes since 1.3.2: - fixes problem with cleanup and Perl 5.6.0+ which broke session management. Spotted by Lukas Zapletal and Andy Lim. - Improved Makefile.PL to catche more setup situation on Win 32. - Make $r - Error settable to be able to reset Embperl's internal error flag. - workaround for $r - chdir_file not working correctly inside of Apache::Registry with ActiveState Perl, which caused make test to fail. - fixed SIGSEGVs that could occur on rare situations when multiple file not found errors are reported. - fixed problem with wrong setup of Content-Length header when running in CGI mode, with escmode = 0. Spotted by Edwin Ramirez. - fixed problem with nested dynamic tables and Execute. - added correct errror message for rcNotCompiledForModPerl. Spotted by Scott Chapman. - Gerald Richterecos electronic communication services gmbh Internetconnect * Webserver/-design/-datenbanken * Consulting Post: Tulpenstrasse 5 D-55276 Dienheim b. Mainz E-Mail: [EMAIL PROTECTED] Voice:+49 6133 925131 WWW:http://www.ecos.de Fax: +49 6133 925152 -