Re: Template or XML?

2001-09-15 Thread BeerBong

Hello Joshua!

Thank you for fast and detailed answers and support!
You are cool as always.

  We have a 4 year experience in developing web sites
  for our customers. Most of these web sites must present
  information stored in some relational database
  (MySQL or Oracle), and we create a special web interface
  for managing the data stored in the database.
  We cannot use standard modules like DB::Editor,
  because we need to provide a simple and easy-to-use
  interface for end user.
 
  We used to create such interface using Apache::ASP,
  but that was incovenient because we could not
  reuse code for different projects, and it required a programmer
  and a usability specialist to work togather on such interface

 You ever look at XMLSubs in Apache::ASP?  It should
 promote code reuse like you are going for.  You just
 need to install your XMLSubs module in each of your
 projects.

 Also, if you decomp much of your generic application
 logic into some real object, you can init this object,
 say $App, in Script_OnStart, and have it available in
 all scripts just like $Server, $Session, etc.

 use vars qw($App $Form);
 sub Script_OnStart {
my $dbh = DBI-connect(...);
$App = My::App-new(dbh = $dbh, ...);
$Form = $Request-Form;
 }

Of course, we know this and used this feature.


 The you can reference $App in all scripts  includes,
 just like

  %= $App-print_something %

But our crew are 3 designers and 4 programmers.
Designers know nothing about $App and other things, programmers don't know
about CSS and other HTML stuff.
As our crew grows we need to separate our jobs.
Our programmers wants more freedom and know about Apache Perl Modules enough
to use clear Apache Perl API.
IMHO Apache::ASP is ideal for webmasters, who write code and HTML. It is
very simple edit all things in one file. Apache::ASP is ideal as starting
point of Web programming. Reach ASP object functionality allows to create
WEB sites fast. But it is not our main goal.
Now, while programmers code clear Perl Module, designers create templates at
the same time. We dont disturb each other (Thanks god, they know about IF
and WHILE :) but it is a limit for them - They are artists, creators, not a
narrowminded programmers - Sorry :) )
We like it.


 since all scripts  includes are compiled into the same
 package as global.asa.

 For support of the code you mentioned like:

  edit sql=update banned_ip set ip=? where ip=? params=ip old_ip
  delete sql=delete from musica.banned where banned_ip = ?
params=old_ip
  add sql=insert into musica.banned (banned_ip) values (?) params=ip

 You can define

   PerlSetVar XMLSubsMatch edit|delete|add

 Then in global.asa, you can define you subs like so:

 # assuming edit() represents a widget  db function
 sub edit {
   my($args, $html) = @_;
   my @params = split(/\s+/, $args-{params});
   if($Form-{'edit'}) {
 $App-{dbh}-do($args-{sql}, undef, map { $Form-{$_} } @params);
   }
   print input type=submit name=edit value=Edit;
 }

 Because these XMLSubs don't have their own namespace you
 would not be able to decomp them into their own perl package,
 but you could put them in a perl module without a package,
 and then use/require/do them from global.asa to import.
 I only suggest this for code reuse between projects.
 You could also have them in a package, and them import
 the functions, but you might have to reference vars like
 $main::App, which you would have to init in global.asa.

 Its very easy to not use good coding practice with
 Apache::ASP, but you can use like any other full embedded perl
 environment for good code reuse.

 One more thing ... XMLSubs are limited to parsing out only
 the XML attributes  body, so things like FOREACH are harder
 to implement, however a recent feature makes it possible,
 as you can now $Response-Include() scripts data on the fly,
 not just file names, so:

 XMLSubs FOREACH|rows|row|inp

   rows name=myrows action=fetch sql=select banned_ip from banned order
by banned_ip
 ...
   FOREACH c=myrows
   row
   inp name=ip type=text value=c.banned_ip size=15
   inp name=old_ip type=hidden value=c.banned_ip
   /row
   /FOREACH

 sub rows {
   my $args = shift;
   my @rows;
   my $sth = $App-{dbh}-prepare($args-{sql});
   while(my $row = $sth-fetchrow_hashref) { push(@rows, $row); }
   $App-{rows}{$args-{name}} = $rows;
 }

 sub FOREACH {
   my($args, $script) = @_;
   my $rows = $App-{rows}{$args-{c}};
   for my $row (@$rows) {
  $App-{currrow} = $row;
  $Response-Include(\$script);
   }
 }

 sub inp {
   my $args = shift;
   my $row = $App-{currrow};
   print input name=$args-{name} value=$row-{$args-{name}} ...;
 }

 Just as example of how you might achieve what you are going
 for with Apache::ASP.  I know you used it before, but the
 application environment has grown considerably over time,
 now in its 4th year of development.

Huh!
Great improvments, as I understand ASP scripts can contains XML tags only
now.
It is what we need, but correct me if 

Re: Template or XML = OpenInteract?

2001-09-15 Thread BeerBong

  We have also heard something about OpenInteract, which is based on
  Template Toolkit - may be it would be simplier to use it?

 It does sound like a possible good choice for your purposes, since it
 combines a basic application structure with Template Toolkit integration
and
 an object/relational mapping tool (SPOPS) for data management.

It seems to be interesting application.
We developed many content management systems for sites with more than one
access rights levels and more than one databases as storage of content
(MySQL and Oracle, if be precise).
May be we will use it, although it (SPOPS-0.50) don't want be compiled on my
home WinXP environment.
Errors while SPOPS make test
---
t\30_dbiok 4/18se of uninitialized value in string at
C:/TEMP/SPOPS-
0.50/blib/lib/SPOPS/DBI.pm line 634.
SPOPS::DBI::_save_insert (634)  Insert failed! Args:  $VAR1 = {
  'db' = bless( {}, 'DBI::db' ),
  'is_add' = 1,
  'table' = 'spops_test',
  'skip_cache' = 1,
  'field' = [
   'spops_goop',
   'spops_id',
   'spops_name',
   'spops_num'
 ],
  'value' = [
   'oopie doop',
   42,
   'MyProject',
   241
 ],
  'return_sth' = 1
};
---
and if I make install, I get a similar errors while do
oi_manage --package=INITIAL install_sql

 Personally, the way I would do this is to write the config stuff you're
 doing in XML as straight Perl data structures (nested hashes and arrays).
I
 would do all of the database processing in standard Perl modules, and only
 use TT to display results and editing forms.  If your TT templates seem
 messy, it may be because you're trying to do too much application logic in
 them.  It's best to avoid things like the DBI plugin and do all the real
 work before you run the template.

All logic performed in Perl modules, templates contains [% IF %] and [%
FOREACH %] tags only for designers as I wrote in previous letter. DBI plugin
in TT just for exmaple, in real scenario it is more simpler -

$self-{res}{rows} = $self-{dbh}-selectall_hashref(select * from test);

Our main goal:
Programmer write script with logic tags kinda
edit sql...
delete sql..
and choose from many usability tags, which are good looking, designers
made HTML blocks
table_edit
or
single_row_edit

BTW, Template Toolkit future version offers such ability

[%# Logic %]

[% XML %]
edit sql...
delete sql..
select sql..

[%# Design %]

table_edit
[% FOREACH %]
  single_row_edit
[% END %]

/table_edit
[% END %]

---
Sergey BeerBong Polyakov
Chief of WebZavod
http://www.webzavod.ru




Re: Template or XML = OpenInteract?

2001-09-15 Thread Chris Winters

* BeerBong ([EMAIL PROTECTED]) [010915 07:43]:
   We have also heard something about OpenInteract, which is based on
   Template Toolkit - may be it would be simplier to use it?
 
  It does sound like a possible good choice for your purposes, since it
  combines a basic application structure with Template Toolkit integration
 and
  an object/relational mapping tool (SPOPS) for data management.
 
 It seems to be interesting application.
 We developed many content management systems for sites with more than one
 access rights levels and more than one databases as storage of content
 (MySQL and Oracle, if be precise).
 May be we will use it, although it (SPOPS-0.50) don't want be compiled on my
 home WinXP environment.
 Errors while SPOPS make test
 t\30_dbiok 4/18se of uninitialized value in string at
 C:/TEMP/SPOPS-
 0.50/blib/lib/SPOPS/DBI.pm line 634.
 SPOPS::DBI::_save_insert (634)  Insert failed! Args:  $VAR1 = {
   'db' = bless( {}, 'DBI::db' ),
   'is_add' = 1,
   'table' = 'spops_test',
   'skip_cache' = 1,
   'field' = [
'spops_goop',
'spops_id',
'spops_name',
'spops_num'
  ],
   'value' = [
'oopie doop',
42,
'MyProject',
241
  ],
   'return_sth' = 1
 };

This probably depends on the database you're using as to why it
failed. We can definitely help out with this, but there are separate
mailing lists for this so we don't bog down the modperl list.

 and if I make install, I get a similar errors while do
 oi_manage --package=INITIAL install_sql

Ditto as above. I'll take this msg over to the list to see if we can
help out.

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.



Re: Template or XML?

2001-09-15 Thread Chris Winters

* Perrin Harkins ([EMAIL PROTECTED]) [010914 17:11]:
  We have also heard something about OpenInteract, which is based on
  Template Toolkit - may be it would be simplier to use it?
 
 It does sound like a possible good choice for your purposes, since it
 combines a basic application structure with Template Toolkit integration and
 an object/relational mapping tool (SPOPS) for data management.

OpenInteract will probably do what you want, but one of its design
philosophies is to have the templates to relatively simple work and
handlers do the real data manipulation. So from the example in your
original message:

  [% data=fetch({sql=SELECT MessageId, Subject FROM Messages}) %]

You might do something like

package MySite::Handler::Messages;

sub listing {
my ( $class, $p ) = @_;
my $R = OpenInteract::Request-instance;
my $message_iterator = eval { $R-message-fetch_group };
my ( $error );
if ( $@ ) {
$error = Cannot retrieve messages: $SPOPS::Error::system_msg;
}
return $R-template( {}, { iter = $message_iterator,
   error_msg = $error },
 { name = 'mypkg::message_list' } );
}

And in your template:

--

h1Summary of messages/h1

[% IF NOT iter.has_next -%]

pSorry, no messages to display./p

[% ELSE -%]

table border=0
[% WHILE ( message = iter.get_next ) -%]
   tr
 td[% message.subject %]/td
 td[% message.from %]/td
 [% view_url = OI.make_url( base = '/Message/show', 
message_id = message.id ) -%]
 tda href=[% view_url %]View message/a/td
   /tr
[% END -%]
/table 

[% END -%]

--

So in your handler you have the option of ordering the messages as you
wish, screening certain ones out, etc. And the template can make
simple display decisions but doesn't do much with the data besides
display it.

One last thing: I'm not sure how large your application is, but for
small applications OpenInteract is most likely overkill. The only way
I'd write something simple (e.g., a guestbook) in OI is if I already
had an OI system installed and wanted to extend it.

Hope this helps,

Chris

-- 
Chris Winters ([EMAIL PROTECTED])
Building enterprise-capable snack solutions since 1988.



Re: Template or XML?

2001-09-15 Thread BeerBong

 OpenInteract will probably do what you want, but one of its design
 philosophies is to have the templates to relatively simple work and
 handlers do the real data manipulation. So from the example in your
 original message:

   [% data=fetch({sql=SELECT MessageId, Subject FROM Messages}) %]

 You might do something like

 package MySite::Handler::Messages;

 sub listing {
 my ( $class, $p ) = @_;
 my $R = OpenInteract::Request-instance;
 my $message_iterator = eval { $R-message-fetch_group };
 my ( $error );
 if ( $@ ) {
 $error = Cannot retrieve messages: $SPOPS::Error::system_msg;
 }
 return $R-template( {}, { iter = $message_iterator,
error_msg = $error },
  { name = 'mypkg::message_list' } );
 }

 And in your template:

 --

 h1Summary of messages/h1

 [% IF NOT iter.has_next -%]

 pSorry, no messages to display./p

 [% ELSE -%]

 table border=0
 [% WHILE ( message = iter.get_next ) -%]
tr
  td[% message.subject %]/td
  td[% message.from %]/td
  [% view_url = OI.make_url( base = '/Message/show',
 message_id = message.id ) -%]
  tda href=[% view_url %]View message/a/td
/tr
 [% END -%]
 /table

 [% END -%]

 --

 So in your handler you have the option of ordering the messages as you
 wish, screening certain ones out, etc. And the template can make
 simple display decisions but doesn't do much with the data besides
 display it.

In the my answer to Joshua, I wrote that it was bad example of our usage of
TT.
Templates does not contain tags, besides IF and FOREACH usually.
All database access and any data processing on Perl module side.

 One last thing: I'm not sure how large your application is, but for
 small applications OpenInteract is most likely overkill. The only way
 I'd write something simple (e.g., a guestbook) in OI is if I already
 had an OI system installed and wanted to extend it.

We have about 20-30 sites with content management. All these content editors
has similar
HTML and code blocks.
(www.webzavod.ru/projects/contentum/ - example for future customers)
Our goal
1. Place all these CSS, images files and reusable HTML blocks (= includes or
xml tags) in one directory, which will be Aliased for every site.
2. There is Apache module Apache::Contentum with reusable subs, which also
we call xml tags.
3. For every site we can, if needed, create Apache module - descendant of
Apache::Contentum with specific for this site features.

As you can see it is not 'guestbook' task, and we will extend this system in
future and very important to choose right solution now. All these steps done
in many variants, but I don't like the results :( We want to share our work,
and create open project, but code is not pure, as yours... Learn, learn and
learn as told great Lenin :)

We wrote configs in Data::Dumper format, compiles them, inserts them into
Apache Perl module for every site.
We consider to place these data to one file with representation data now.
Clear TT solutions - too much [% PROCESS %], and it is not so reusable as
XML
I think, we dont know XML so good yet and how to implement well-defined
database driven features in XML, although we made 2 AxKit site
(http://nalog.samara.ru for example), we decided that database driven sites
simpler implement as Perl Module + TT.

About my problem with SPOPS...
I have - Win mysql 3.23.41
and DBI 1.14 (there is not newer version for Active Perl), DBD::MySQL 1.22
If I don't solve this problem by myslf I'll descibe it to
http://www.openinteract.org/support
Thanks...

---
Sergey BeerBong Polyakov
Chief of WebZavod
http://www.webzavod.ru




Re: Updating $r-connection-aborted before $r-print() ?

2001-09-15 Thread Stas

Geoffrey Young wrote:
 
-Original Message-
From: Joshua Chamas [mailto:[EMAIL PROTECTED]]
Sent: Friday, September 14, 2001 3:21 PM
To: Mod Perl
Subject: Updating $r-connection-aborted before $r-print() ?


Hey,

In my own experience it seems that I can only get
$r-connection-aborted updated if I first do a $r-print().
Is there any way to get aborted to update without 
$r-print?

 
 my $fileno = $r-connection-fileno;
 
 $s = IO::Select-new($fileno);
 
 die aborted if grep { m/$fileno/ } $s-can_read(1);


Hmm, does this actually work Geoff? What happens if mod_perl is running 
as a back-end? In this case $r-connection-aborted doesn't work even if 
you print.

Joshua, what about print \0, I'm not sure whether this messes up the 
headers. given that you end these tests with a new line.

_
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/





RE: Updating $r-connection-aborted before $r-print() ?

2001-09-15 Thread Geoffrey Young

 



 my $fileno = $r-connection-fileno;



 



 $s = IO::Select-new($fileno);



 



 die aborted if grep { m/$fileno/ } $s-can_read(1);











Hmm, does this actually work Geoff? What happens if mod_perl is running 



as a back-end? In this case $r-connection-aborted doesn't work even if






you print.





yes, it worked for me.  actually, I guess I should have been clearer - this
has nothing to do with $c-aborted or $r-print (well, on the outside
anyway).  for $c-aborted you have to wait for Apache to flush the print
buffers.  actually, in my tests $r-rflush didn't help things behave - only
$|=1 did.  

$s-can_read should always work because Apache marks the client output file
descriptor with a zero-length packet for reading when the client dies.  so,
when you can read from where you ought to be writing, you can assume a
broken connection.

at least this is my understanding. wish I could take credit, though - Eric
discovered/documented this one a while ago:)

at any rate, this worked for me just fine in some tests, but I never tested
it against a front-end/back-end setup.  seems like you would never be able
to detect a broken client connection from in a proxy setup anyway, but
that's not my area to comment on...

--Geoff



Apache.pm fails to load...

2001-09-15 Thread U n d e r a c h i e v e r

Hi

I'm making a fresh build of Apache on Solaris 8 with mod_perl and
mod_ssl.
 
When I load apache i get
Apache.pm failed to load!
in the error log and the application bombs out.

adding
PerlModule Apache
to the top of my httpd.conf also results in failed apache load, this
time with a slightly more descriptive error:

Syntax error on line 48 of /etc/apache/httpd.conf: 
Can't locate Apache.pm in @INC (@INC contains:
/usr/perl5/5.00503/sun4-solaris /usr/perl5/5.00503
usr/perl5/site_perl/5.005/sun4-solaris /usr/perl5/site_perl/5.005 .
usr/local/apache/ /usr/local/apache/lib/perl) at (eval 2) line 3.

/usr/local/apache/bin/apachectl start: httpd could not be started

so i'm guessing this is a paths issue. a look for Apache.pm reveals
three:

find / -name Apache.pm
~/mod_perl-1.26/lib/Bundle/Apache.pm
~/mod_perl-1.26/Apache/Apache.pm
/usr/perl5/5.00503/CGI/Apache.
   
  
which one of these should i be moving or symlinking to the @INC path?
or is this the wrong approach?

Thanks in advance
 
PS Here's details of how i undertook the build in case that's relevant:

cd ~
export PATH=/bin:/sbin:/usr/bin:/usr/local/bin:/usr/local/sbin \
:/usr/share/lib:/export/home/opt/SUNWspro/bin:/usr/xpg4/bin \
:/usr/ccs/bin:/usr/dt/bin:/usr/openwin/bin:/usr/ucb: \
/usr/local/acrobat4/bin

cd openssl-0.9.6b
./config
make
make test
make install
cd ..
cd mod_perl-1.26/
perl Makefile.PL \
  APACHE_PREFIX=/usr/local/apache \
  APACHE_SRC=../apache_1.3.20/src \
  USE_APACI=1
cd ..
cd mod_ssl-2.8.4-1.3.20
./configure --with-apache=../apache_1.3.20 \
  --prefix=/usr/local/apache \
  --with-ssl=../openssl-0.9.6b \
  --activate-module=src/modules/perl/libperl.a
cd ..
cd apache_1.3.20
SSL_BASE=../openssl-0.9.6b CC=cc ./configure \
  --prefix=/usr/local/apache   \
  --sysconfdir=/etc/apache \
  --datadir=/export/home/httpd \
  --logfiledir=/var/log/httpd  \
  --runtimedir=/var/log/httpd  \
  --enable-module=ssl  \
  --activate-module=src/modules/perl/libperl.a \
  --disable-rule=EXPAT \
  --enable-module=perl \
make
make certificate
sudo make install


=
u n d e r a c h i e v e r (and proud)
[EMAIL PROTECTED]

__
Terrorist Attacks on U.S. - How can you help?
Donate cash, emergency relief information
http://dailynews.yahoo.com/fc/US/Emergency_Information/



Re: Environment variable $ENV{MOD_PERL}

2001-09-15 Thread Medi Montaseri


Thank you for everyone's support
My problem was that I was reading suggestions like don't change your CGI
script as Apache::DBI persistance connection is fully transparent...
too literally

The pre-requsite to this mod_perl is to have your CGI scripts run under
a special mod_perl directoryyes, I read that in the Eagle book, but
in Chapter 2, and by the time I got to the meating things, had forgotton
this prereq

Note to Author of Apache::DBI, could you please add a brief comment in
this regard to your Configuration section. Also, in your document, 
you keep referring to eg/startup.pl. I don't think we get that with just
a binary (or RPM install)...

Anyways...overall I was at fault for not re-re-read documents

On Sat, 15 Sep 2001, Stas Bekman wrote:

 On Fri, 14 Sep 2001, Medi Montaseri wrote:
 
  These documents are very confusingon one hand the document the other
  caller mentioned does explicitly talk about two conditions should exists.
  Note A AND B. And then we hear that that is not really true...And even
  Apache::DBI.pm itslef does not talk about it and there is no way that I
  know of that one can tell, if we do indeed have a persistant connection or
  have simply required some dumb packages...
 
  We appreciate the technology such package authors bring to us...but please
  regard the documentation part as important as other parts...
  We are doing out best to keep the Perl and open source flag up, but we
  can not read source code all day long, our Microsoftish developers are way
  ahead of us with their fancy IDEs
 
 As Andrew said, you just need to learn how to find your way around. I
 believe it's still easier than trying to get somebody on the support call
 to explain it to you. The cool thing is that once you know your way
 around, you don't need anybody else to help yourself. I admit that the
 initial overhead may be longer but it's only in the beginning.
 
 Back to your problem. What I've suggested is that may be you aren not
 running mod_perl at all [read: you run mod_cgi]! Try to put into your
 startup.pl:
 
 die not running under mod_perl unless $ENV{MOD_PERL};
 
  On Sat, 15 Sep 2001, Stas Bekman wrote:
 
   On Fri, 14 Sep 2001, Flavio D' Amore wrote:
  
Hi,
im reading on mod_perl and Relational Databases
(http://apache.org/guide/databases.html), Introduction, that persistent
database connections needs to have set $ENV{MOD_PERL} in order to execute
CGI perl script
via mod_perl and not via normal CGI.
   
What's the right value for that variable  and where i've to set it
(httpd.conf or Unix environment?)?
  
   mod_perl does this for you. You shouldn't mess with it yourself.
  
   Hmm, may be you don't run under mod_perl even if you think you are?
  
  
  
  
   _
   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/
  
  
  
 
  --
  -
  Medi Montaseri   [EMAIL PROTECTED]
  Unix Distributed Systems EngineerHTTP://www.CyberShell.com
  CyberShell Engineering
  -
 
 
 
 
 _
 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/
 
 
 

-- 
-
Medi Montaseri   [EMAIL PROTECTED]
Unix Distributed Systems EngineerHTTP://www.CyberShell.com
CyberShell Engineering
-




Re: Template or XML?

2001-09-15 Thread Joshua Chamas

BeerBong wrote:
 
 Of course, we know this and used this feature.
 
 
  The you can reference $App in all scripts  includes,
  just like
 
   %= $App-print_something %
 
 But our crew are 3 designers and 4 programmers.
 Designers know nothing about $App and other things, programmers don't know
 about CSS and other HTML stuff.

My point with mentioning the global objects was that was
the starting point for building an XMLSubs infrastructure,
because the XMLSubs themselves don't know more than the 
attributes and body data they are passed otherwise.

 Huh!
 Great improvments, as I understand ASP scripts can contains XML tags only
 now.
 It is what we need, but correct me if I wrong, there are many other
 solutions, which do the same more efficient and simpler. This idealogy
 (separate code and html) is far away from original ASP idea _embed_ code
 into HTML.

I would approach your problem with an XMLSubs solution, which is
what it was designed for.  I don't know if other ways are more
efficient ( benchmarks? ) or simpler.  I have found the XMLSubs
solution to be very powerful way to create your own custom tags
for your design shop.  If you can encapsulate all of your logic
in your custom tags, then you can free your designers from what
is going on behind the scenes, and they can get back to the
business of being creative artists!

The only way that Apache::ASP gets in the way of your needs, is
that it ALLOWS for % % code blocks to be embedded in your
templates.  This is where its origins get in the way.  The reason
this is a problem is that people will use this if they have it
to use, designers  programmers, and regardless of your coding
standards, it will happen...

What I would do to FORCE separation of logic from templates
is create a config 

  PerlSetVar CodeBlocks 0 

which would automatically render % % useless.  Then you could
develop your XMLSubs tag suite and the total templatting solution
for your shop.  I believe also you would want to set

  PerlSetVar XMLSubsStrictArgs 1

so that the attributes would not allow perl code so you could
strictly control the environment from a programming perspective.

Note that building your XMLSubs infrastructure is a significant
investment, but the productivity increases that you are looking 
for can make it worthwhile.

--Josh



Multiple apache servers/diff Ports

2001-09-15 Thread Jonathon M. Robison

I am trying to create multiple instances of a large program we are working on.  The 
apache server loads upwards of 10 modperl modules upon startup.
I have duplicated all the modperl modules into a new directory structure with a new 
name, etc. and created a seperate set of confs for apache. The port I chose at random 
is 10010. The original copy was ALSO changed to include a version number, etc. in the 
dir structure.
The one on port 80 works.  The one on port 10010 does not.  

The only error I continually get is a permissions error. You do not have permission 
to access http://localhost/dir/action; (note the lack of port number) and a signature 
telling me the error is generated by Apache 1.13.x on Port 10010. (BTW - the 'action' 
is not a real file, but a command to be read by a handler module and interpreted - 
this system has no html files).

Is it possible that the apache request object, etc. isn't passing the port number?

I'm really stumped.  If anyone has experience running multiple apache's loading 
modules, please let me know.  

The only thing the conf's share is an aliased directory.  All the conf's are 
versioned, as well as the htdocs and perl modules.

Jon Robison


__
Your favorite stores, helpful shopping tools and great gift ideas. Experience the 
convenience of buying online with Shop@Netscape! http://shopnow.netscape.com/

Get your own FREE, personal Netscape Mail account today at http://webmail.netscape.com/




ANNOUNCE: modperl docs 2.0 documentation project mailing list andcvs rep.

2001-09-15 Thread Stas Bekman

[This message is crossposted to all mod_perl lists. It is possible that
we will concentrate all mod_perl projects docs in one place.]

A new cvs rep and two mailing lists were created and we're starting to
commit shorlty to this repository shortly after this announcement.

If you are interested in helping us creating great documentation by
reviewing what gets committed and submitting new docs and patches, please
subscribe to these two mailing list:

[EMAIL PROTECTED]
[EMAIL PROTECTED]

Then you can post to the docs list, take
[EMAIL PROTECTED] address and remove the -subscribe part
from it to post. Please don't link to the list directly so we won't get
spammed. Thanks.

The new repository is called modperl-docs, but it'll be automatically
placed into modperl-2.0/docs when you check out mod_perl. So you can get
the rep in one of these ways:

 % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic login
 % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-2.0

and then look in modperl-2.0/docs or:

 % cvs -d :pserver:[EMAIL PROTECTED]:/home/cvspublic co modperl-docs

I'll send the rest of the update to the new list, so make sure that you
are there. As we will discuss the documentation on that list from now on,
and will unload this list somewhat.

if you've missed my previous RFC and announcement and the discussion that
has triggered it see:
http://forum.swarthmore.edu/epigone/modperl/ginthandswang

Welcome to the yet another cool project.

_
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/





cvs commit: modperl-2.0/xs/tables/current/ModPerl FunctionTable.pm

2001-09-15 Thread dougm

dougm   01/09/15 11:17:31

  Modified:lib/ModPerl TypeMap.pm
   t/response/TestAPR table.pm
   todo api.txt
   xs/maps  apr_functions.map
   xs/tables/current/ModPerl FunctionTable.pm
  Added:   xs/APR/Table APR__Table.h
  Log:
  implement APR::Table-do
  Submitted by: Philippe M . Chiasson [EMAIL PROTECTED]
  Reviewed by:  dougm
  
  Revision  ChangesPath
  1.10  +1 -0  modperl-2.0/lib/ModPerl/TypeMap.pm
  
  Index: TypeMap.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/TypeMap.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- TypeMap.pm2001/09/10 05:35:10 1.9
  +++ TypeMap.pm2001/09/15 18:17:31 1.10
  @@ -396,6 +396,7 @@
   Apache__RequestRec = 'r',
   Apache__Server = 'server',
   Apache__Connection = 'connection',
  +APR__Table = 'table',
   APR__UUID = 'uuid',
   apr_status_t = 'status',
   );
  
  
  
  1.2   +54 -1 modperl-2.0/t/response/TestAPR/table.pm
  
  Index: table.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/table.pm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- table.pm  2001/09/12 16:40:27 1.1
  +++ table.pm  2001/09/15 18:17:31 1.2
  @@ -8,10 +8,13 @@
   use Apache::Const -compile = 'OK';
   use APR::Table ();
   
  +my $filter_count;
  +my $TABLE_SIZE = 20;
  +
   sub handler {
   my $r = shift;
   
  -plan $r, tests = 5;
  +plan $r, tests = 9;
   
   my $table = APR::Table::make($r-pool, 16);
   
  @@ -25,7 +28,57 @@
   
   ok not defined $table-get('foo');
   
  +for (1..$TABLE_SIZE) {
  +$table-set(chr($_+97), $_);
  +}
  +
  +#Simple filtering
  +$filter_count = 0;
  +$table-do(my_filter);
  +ok $filter_count == $TABLE_SIZE;
  +
  +#Filtering aborting in the middle
  +$filter_count = 0;
  +$table-do(my_filter_stop);
  +ok $filter_count == int($TABLE_SIZE)/2;
  +
  +#Filtering with anon sub
  +$filter_count=0;
  +$table-do(sub {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 1;
  +});
  +
  +ok $filter_count == $TABLE_SIZE;
  +
  +$filter_count = 0;
  +$table-do(my_filter, c, b, e);
  +ok $filter_count == 3;
  +
   Apache::OK;
  +}
  +
  +sub my_filter {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 1;
  +}
  +
  +sub my_filter_stop {
  +my ($key,$value) = @_;
  +$filter_count++;
  +unless ($key eq chr($value+97)) {
  +die arguments I recieved are bogus($key,$value);
  +}
  +return 0 if ($filter_count == int($TABLE_SIZE)/2);
  +return 1;
   }
   
   1;
  
  
  
  1.4   +0 -2  modperl-2.0/todo/api.txt
  
  Index: api.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/api.txt,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- api.txt   2001/09/15 17:57:25 1.3
  +++ api.txt   2001/09/15 18:17:31 1.4
  @@ -9,8 +9,6 @@
   $r-headers_out-{KEY} is not currently supported
   might want to make this optional, disabled by default
   
  -missing: APR::Table-do
  -
   $r-finfo:
   need apr_finfo_t - struct stat conversion (might already be there,
   haven't looked close enough yet)
  
  
  
  1.1  modperl-2.0/xs/APR/Table/APR__Table.h
  
  Index: APR__Table.h
  ===
  typedef struct {
  SV *cv;
  apr_table_t *filter; /*XXX: or maybe a mgv ? */
  } mpxs_table_do_cb_data_t;
  
  typedef int (*mpxs_apr_table_do_cb_t)(void *, const char *, const char *);
  
  static int mpxs_apr_table_do_cb(void *data,
  const char *key, const char *val)
  {
  dTHX; /*XXX*/
  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)) {
  return 0;
  }
  
  /* Skip entries if not in our filter list */
  if (tdata-filter) {
  if (!apr_table_get(tdata-filter, key)) {
  return 1;
  }
  }
  
  ENTER;
  SAVETMPS;
  
  PUSHMARK(sp);
  XPUSHs(sv_2mortal(newSVpv(key,0)));
  XPUSHs(sv_2mortal(newSVpv(val,0)));
  PUTBACK;
  
  rv = call_sv(tdata-cv, 0);
  SPAGAIN;
  rv = (1 == rv) ? POPi : 1;
  PUTBACK;
  
  FREETMPS;
  LEAVE;
  
  /* rv of 0 aborts the traversal */
  return rv;
  

cvs commit: modperl-2.0/xs/APR/Table APR__Table.h

2001-09-15 Thread dougm

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.h  2001/09/15 18:17:31 1.1
  +++ APR__Table.h  2001/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);
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_config.c

2001-09-15 Thread dougm

dougm   01/09/15 13:17:35

  Modified:src/modules/perl modperl_config.c
  Log:
  only inherit base PerlSwitches if explicitly told to with PerlSwitches +inherit
  
  Revision  ChangesPath
  1.36  +9 -2  modperl-2.0/src/modules/perl/modperl_config.c
  
  Index: modperl_config.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_config.c,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- modperl_config.c  2001/08/10 23:37:33 1.35
  +++ modperl_config.c  2001/09/15 20:17:35 1.36
  @@ -168,8 +168,15 @@
   merge_item(perl);
   #endif
   
  -/* argv always initialized to 1 with ap_server_argv0 */
  -mrg-argv = add-argv-nelts  1 ? add-argv : base-argv;
  +if (add-argv-nelts == 2 
  +strEQ(((char **)add-argv-elts)[1], +inherit))
  +{
  +/* only inherit base PerlSwitches if explicitly told to */
  +mrg-argv = base-argv;
  +}
  +else {
  +mrg-argv = add-argv;
  +}
   
   mrg-flags = modperl_options_merge(p, base-flags, add-flags);
   
  
  
  



cvs commit: modperl-2.0/src/modules/perl modperl_perl.c modperl_perl.h

2001-09-15 Thread dougm

dougm   01/09/15 15:25:29

  Added:   src/modules/perl modperl_perl.c modperl_perl.h
  Log:
  new module for small tweaks to the Perl runtime
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  #include mod_perl.h
  
  /* this module contains mod_perl small tweaks to the Perl runtime
   * others (larger tweaks) are in their own modules, e.g. modperl_env.c
   */
  
  void modperl_perl_init_ids(pTHX)
  {
  sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), (I32)getpid());
  
  #ifndef WIN32
  PL_uid  = (int)getuid(); 
  PL_euid = (int)geteuid(); 
  PL_gid  = (int)getgid(); 
  PL_egid = (int)getegid(); 
  MP_TRACE_g(MP_FUNC, 
 uid=%d, euid=%d, gid=%d, egid=%d\n,
 PL_uid, PL_euid, PL_gid, PL_egid);
  #endif
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===
  #ifndef MODPERL_PERL_H
  #define MODPERL_PERL_H
  
  void modperl_perl_init_ids(pTHX);
  
  #endif /* MODPERL_PERL_H */
  
  
  



cvs commit: modperl-2.0/lib/ModPerl Code.pm

2001-09-15 Thread dougm

dougm   01/09/15 15:25:55

  Modified:lib/ModPerl Code.pm
  Log:
  integrate modperl_perl.[ch]
  
  Revision  ChangesPath
  1.66  +2 -1  modperl-2.0/lib/ModPerl/Code.pm
  
  Index: Code.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Code.pm,v
  retrieving revision 1.65
  retrieving revision 1.66
  diff -u -r1.65 -r1.66
  --- Code.pm   2001/05/08 21:08:18 1.65
  +++ Code.pm   2001/09/15 22:25:55 1.66
  @@ -522,7 +522,8 @@
   );
   
   my @c_src_names = qw(interp tipool log config cmd options callback handler
  - gtop util io filter bucket mgv pcw global env cgi);
  + gtop util io filter bucket mgv pcw global env cgi
  + perl);
   my @g_c_names = map { modperl_$_ } qw(hooks directives flags xsinit);
   my @c_names   = ('mod_perl', (map modperl_$_, @c_src_names));
   sub c_files { [map { $_.c } @c_names, @g_c_names] }
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c mod_perl.h

2001-09-15 Thread dougm

dougm   01/09/15 15:26:57

  Modified:src/modules/perl mod_perl.c mod_perl.h
  Log:
  add modperl_hook_child_init
  call modperl_perl_init_ids from modperl_hook_child_init
  
  Revision  ChangesPath
  1.68  +12 -0 modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.67
  retrieving revision 1.68
  diff -u -r1.67 -r1.68
  --- mod_perl.c2001/09/13 03:18:27 1.67
  +++ mod_perl.c2001/09/15 22:26:57 1.68
  @@ -352,6 +352,15 @@
   return OK;
   }
   
  +static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
  +{
  +#ifdef USE_ITHREADS
  +/*XXX*/
  +#else
  +modperl_perl_init_ids(aTHX);
  +#endif
  +}
  +
   void modperl_register_hooks(apr_pool_t *p)
   {
   ap_hook_open_logs(modperl_hook_init,
  @@ -391,6 +400,9 @@
   
   ap_hook_header_parser(modperl_hook_header_parser,
 NULL, NULL, APR_HOOK_FIRST);
  +
  +ap_hook_child_init(modperl_hook_child_init,
  +   NULL, NULL, APR_HOOK_MIDDLE);
   
   modperl_register_handler_hooks();
   }
  
  
  
  1.36  +1 -0  modperl-2.0/src/modules/perl/mod_perl.h
  
  Index: mod_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.h,v
  retrieving revision 1.35
  retrieving revision 1.36
  diff -u -r1.35 -r1.36
  --- mod_perl.h2001/08/19 17:22:55 1.35
  +++ mod_perl.h2001/09/15 22:26:57 1.36
  @@ -34,6 +34,7 @@
   #include modperl_global.h
   #include modperl_env.h
   #include modperl_cgi.h
  +#include modperl_perl.h
   
   void modperl_init(server_rec *s, apr_pool_t *p);
   void modperl_hook_init(apr_pool_t *pconf, apr_pool_t *plog, 
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h

2001-09-15 Thread dougm

dougm   01/09/15 17:56:15

  Modified:src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  init ids for ithread Perls
  
  Revision  ChangesPath
  1.69  +6 -2  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.68
  retrieving revision 1.69
  diff -u -r1.68 -r1.69
  --- mod_perl.c2001/09/15 22:26:57 1.68
  +++ mod_perl.c2001/09/16 00:56:15 1.69
  @@ -354,10 +354,14 @@
   
   static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
   {
  +modperl_perl_ids_t ids;
  +modperl_perl_ids_get(ids);
   #ifdef USE_ITHREADS
  -/*XXX*/
  + modperl_interp_mip_walk_servers(NULL, s,
  + modperl_perl_init_ids_mip,
  +(void*)ids);
   #else
  -modperl_perl_init_ids(aTHX);
  +modperl_perl_init_ids(aTHX_ ids);
   #endif
   }
   
  
  
  
  1.2   +28 -8 modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl.c2001/09/15 22:25:29 1.1
  +++ modperl_perl.c2001/09/16 00:56:15 1.2
  @@ -4,17 +4,37 @@
* others (larger tweaks) are in their own modules, e.g. modperl_env.c
*/
   
  -void modperl_perl_init_ids(pTHX)
  +void modperl_perl_ids_get(modperl_perl_ids_t *ids)
   {
  -sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), (I32)getpid());
  -
  +ids-pid  = (I32)getpid();
   #ifndef WIN32
  -PL_uid  = (int)getuid(); 
  -PL_euid = (int)geteuid(); 
  -PL_gid  = (int)getgid(); 
  -PL_egid = (int)getegid(); 
  +ids-uid  = getuid();
  +ids-euid = geteuid(); 
  +ids-gid  = getgid(); 
  +ids-gid  = getegid(); 
  +
   MP_TRACE_g(MP_FUNC, 
  uid=%d, euid=%d, gid=%d, egid=%d\n,
  -   PL_uid, PL_euid, PL_gid, PL_egid);
  +   (int)ids-uid, (int)ids-euid,
  +   (int)ids-gid, (int)ids-egid);
   #endif
  +}
  +
  +void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids)
  +{
  +sv_setiv(GvSV(gv_fetchpv($, TRUE, SVt_PV)), ids-pid);
  +
  +#ifndef WIN32
  +PL_uid  = ids-uid;
  +PL_euid = ids-euid;
  +PL_gid  = ids-gid;
  +PL_egid = ids-egid;
  +#endif
  +}
  +
  +apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  +   void *data)
  +{
  +modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
  +return APR_SUCCESS;
   }
  
  
  
  1.2   +12 -1 modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl.h2001/09/15 22:25:29 1.1
  +++ modperl_perl.h2001/09/16 00:56:15 1.2
  @@ -1,6 +1,17 @@
   #ifndef MODPERL_PERL_H
   #define MODPERL_PERL_H
   
  -void modperl_perl_init_ids(pTHX);
  +typedef struct {
  +I32 pid;
  +Uid_t uid, euid;
  +Gid_t gid, egid;
  +} modperl_perl_ids_t;
  +
  +void modperl_perl_ids_get(modperl_perl_ids_t *ids);
  +
  +void modperl_perl_init_ids(pTHX_ modperl_perl_ids_t *ids);
  +
  +apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  +   void *data);
   
   #endif /* MODPERL_PERL_H */
  
  
  



cvs commit: modperl-2.0/todo missing_old_features.txt

2001-09-15 Thread dougm

dougm   01/09/15 17:58:22

  Modified:todo missing_old_features.txt
  Log:
  ids are now set
  
  Revision  ChangesPath
  1.5   +0 -2  modperl-2.0/todo/missing_old_features.txt
  
  Index: missing_old_features.txt
  ===
  RCS file: /home/cvs/modperl-2.0/todo/missing_old_features.txt,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- missing_old_features.txt  2001/09/06 05:05:46 1.4
  +++ missing_old_features.txt  2001/09/16 00:58:22 1.5
  @@ -26,8 +26,6 @@
   
   - cgi emulation, i.e. %ENV/END{}/@INC/exit() management
   
  -- set Perl ids after fork $( $) $ $ (child_init)
  -
   - die 404;
   
   - ... others ...
  
  
  



cvs commit: modperl-2.0/src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h

2001-09-15 Thread dougm

dougm   01/09/15 18:05:44

  Modified:src/modules/perl mod_perl.c modperl_perl.c modperl_perl.h
  Log:
  move code out of modperl_hook_child_init into modperl_perl_init_ids_server
  
  Revision  ChangesPath
  1.70  +1 -9  modperl-2.0/src/modules/perl/mod_perl.c
  
  Index: mod_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/mod_perl.c,v
  retrieving revision 1.69
  retrieving revision 1.70
  diff -u -r1.69 -r1.70
  --- mod_perl.c2001/09/16 00:56:15 1.69
  +++ mod_perl.c2001/09/16 01:05:44 1.70
  @@ -354,15 +354,7 @@
   
   static void modperl_hook_child_init(apr_pool_t *p, server_rec *s)
   {
  -modperl_perl_ids_t ids;
  -modperl_perl_ids_get(ids);
  -#ifdef USE_ITHREADS
  - modperl_interp_mip_walk_servers(NULL, s,
  - modperl_perl_init_ids_mip,
  -(void*)ids);
  -#else
  -modperl_perl_init_ids(aTHX_ ids);
  -#endif
  +modperl_perl_init_ids_server(s);
   }
   
   void modperl_register_hooks(apr_pool_t *p)
  
  
  
  1.3   +13 -0 modperl-2.0/src/modules/perl/modperl_perl.c
  
  Index: modperl_perl.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl.c2001/09/16 00:56:15 1.2
  +++ modperl_perl.c2001/09/16 01:05:44 1.3
  @@ -38,3 +38,16 @@
   modperl_perl_init_ids(aTHX_ (modperl_perl_ids_t *)data);
   return APR_SUCCESS;
   }
  +
  +void modperl_perl_init_ids_server(server_rec *s)
  +{
  +modperl_perl_ids_t ids;
  +modperl_perl_ids_get(ids);
  +#ifdef USE_ITHREADS
  + modperl_interp_mip_walk_servers(NULL, s,
  + modperl_perl_init_ids_mip,
  +(void*)ids);
  +#else
  +modperl_perl_init_ids(aTHX_ ids);
  +#endif
  +}
  
  
  
  1.3   +2 -0  modperl-2.0/src/modules/perl/modperl_perl.h
  
  Index: modperl_perl.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl.h,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl.h2001/09/16 00:56:15 1.2
  +++ modperl_perl.h2001/09/16 01:05:44 1.3
  @@ -14,4 +14,6 @@
   apr_status_t modperl_perl_init_ids_mip(pTHX_ modperl_interp_pool_t *mip,
  void *data);
   
  +void modperl_perl_init_ids_server(server_rec *s);
  +
   #endif /* MODPERL_PERL_H */
  
  
  



cvs commit: modperl-2.0/xs/tables/current/Apache FunctionTable.pm StructureTable.pm

2001-09-15 Thread dougm

dougm   01/09/15 10:53:13

  Modified:xs/tables/current/Apache FunctionTable.pm StructureTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.19  +61 -3 modperl-2.0/xs/tables/current/Apache/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/FunctionTable.pm,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- FunctionTable.pm  2001/09/13 04:39:57 1.18
  +++ FunctionTable.pm  2001/09/15 17:53:12 1.19
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Wed Sep 12 21:41:32 2001
  +# !  Sat Sep 15 10:57:55 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -3519,7 +3519,7 @@
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'ap_filter_rec_t *',
   'name' = 'ap_register_input_filter',
   'args' = [
 {
  @@ -3537,7 +3537,7 @@
   ]
 },
 {
  -'return_type' = 'void',
  +'return_type' = 'ap_filter_rec_t *',
   'name' = 'ap_register_output_filter',
   'args' = [
 {
  @@ -11006,6 +11006,64 @@
 {
   'type' = 'const char *',
   'name' = 'text'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_broadcast',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_create',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t **',
  +'name' = 'cond'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'pool'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_destroy',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_signal',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'apr_status_t',
  +'name' = 'apr_thread_cond_wait',
  +'args' = [
  +  {
  +'type' = 'apr_thread_cond_t *',
  +'name' = 'cond'
  +  },
  +  {
  +'type' = 'apr_thread_mutex_t *',
  +'name' = 'mutex'
 }
   ]
 },
  
  
  
  1.18  +5 -1  modperl-2.0/xs/tables/current/Apache/StructureTable.pm
  
  Index: StructureTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/Apache/StructureTable.pm,v
  retrieving revision 1.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- StructureTable.pm 2001/09/13 04:39:57 1.17
  +++ StructureTable.pm 2001/09/15 17:53:12 1.18
  @@ -2,7 +2,7 @@
   
   # !!
   # ! WARNING: generated by Apache::ParseSource/0.02
  -# !  Wed Sep 12 21:41:34 2001
  +# !  Sat Sep 15 10:57:57 2001
   # !  do NOT edit, any changes will be lost !
   # !!
   
  @@ -2013,6 +2013,10 @@
   'name' = 'last'
 }
   ]
  +  },
  +  {
  +'type' = 'apr_thread_cond_t',
  +'elts' = []
 },
 {
   'type' = 'apr_thread_mutex_t',