cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 10:26:29

  Modified:lib/Apache Build.pm
  Log:
  remove -undefined suppress from ldflags on darwin (should never be there)
  
  Revision  ChangesPath
  1.97  +7 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.96
  retrieving revision 1.97
  diff -u -r1.96 -r1.97
  --- Build.pm  30 May 2002 06:00:49 -  1.96
  +++ Build.pm  15 Jun 2002 17:26:29 -  1.97
   -170,7 +170,13 
   my $config = tied %Config;
   my $ldflags = $config-{ldflags};
   
  -$config-{ldflags} = '' if WIN32; #same as lddlflags
  +if (WIN32) {
  +$config-{ldflags} = ''; #same as lddlflags
  +}
  +elsif (DARWIN) {
  +#not sure how this can happen, but it shouldn't
  +$config-{ldflags} =~ s/-undefined suppress//;
  +}
   
   my $ldopts = ExtUtils::Embed::ldopts();
   chomp $ldopts;
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR perlio.pm

2002-06-15 Thread stas

stas2002/06/15 12:08:21

  Modified:t/response/TestAPR perlio.pm
  Log:
  disable the failing tests with 5.8.0-RC2 while reworking APR PerlIO layer
  
  Revision  ChangesPath
  1.9   +1 -1  modperl-2.0/t/response/TestAPR/perlio.pm
  
  Index: perlio.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- perlio.pm 31 May 2002 02:19:11 -  1.8
  +++ perlio.pm 15 Jun 2002 19:08:21 -  1.9
   -27,7 +27,7 
   
   #$tests += $lfs_tests if USE_LARGE_FILES; #XXX
   
  -plan $r, tests = $tests, have_perl 'iolayers';
  +plan $r, tests = $tests, todo = [5,8], have_perl 'iolayers';
   
   my $vars = Apache::Test::config()-{vars};
   my $dir  = catfile $vars-{documentroot}, perlio;
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 13:59:06

  Modified:src/modules/perl mod_perl.c
  Log:
  fix modperl_boot prototype
  
  Revision  ChangesPath
  1.125 +1 -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.124
  retrieving revision 1.125
  diff -u -r1.124 -r1.125
  --- mod_perl.c12 Jun 2002 21:13:10 -  1.124
  +++ mod_perl.c15 Jun 2002 20:59:06 -  1.125
   -95,11 +95,10 
   
   #endif /* MP_REFGEN_FIXUP */
   
  -static void modperl_boot(void *data)
  +static void modperl_boot(pTHX_ void *data)
   {
   MP_dBOOT_DATA;
   MP_dSCFG(s);
  -dTHX; /* XXX: not too worried since this only happens at startup */
   int i;
   
   #ifdef MP_REFGEN_FIXUP
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 16:36:52

  Modified:lib/ModPerl Manifest.pm
  Log:
  include TestAPR::util in the dist as it is already skipping the 
apr_generate_random_bytes test
  
  Revision  ChangesPath
  1.4   +0 -2  modperl-2.0/lib/ModPerl/Manifest.pm
  
  Index: Manifest.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/ModPerl/Manifest.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- Manifest.pm   7 Apr 2002 00:49:38 -   1.3
  +++ Manifest.pm   15 Jun 2002 23:36:52 -  1.4
   -90,5 +90,3 
   patches/
   #very few will have Chatbot::Eliza installed
   eliza
  -#apr_generate_random_bytes does not currently work on all platforms
  -TestAPR/util.pm
  
  
  



cvs commit: modperl-2.0/t/response/TestAPR perlio.pm

2002-06-15 Thread dougm

dougm   2002/06/15 16:48:58

  Modified:t/response/TestAPR perlio.pm
  Log:
  disabling tests until perlio issues are sorted out
  
  Revision  ChangesPath
  1.10  +3 -3  modperl-2.0/t/response/TestAPR/perlio.pm
  
  Index: perlio.pm
  ===
  RCS file: /home/cvs/modperl-2.0/t/response/TestAPR/perlio.pm,v
  retrieving revision 1.9
  retrieving revision 1.10
  diff -u -r1.9 -r1.10
  --- perlio.pm 15 Jun 2002 19:08:21 -  1.9
  +++ perlio.pm 15 Jun 2002 23:48:58 -  1.10
   -22,12 +22,12 
   return Apache::OK;
   }
   
  -my $tests = 11;
  +my $tests = 2; #XXX 11;
   my $lfs_tests = 3;
   
   #$tests += $lfs_tests if USE_LARGE_FILES; #XXX
   
  -plan $r, tests = $tests, todo = [5,8], have_perl 'iolayers';
  +plan $r, tests = $tests, have_perl 'iolayers';
   
   my $vars = Apache::Test::config()-{vars};
   my $dir  = catfile $vars-{documentroot}, perlio;
   -66,7 +66,7 
expected failure);
   }
   }
  -
  +return Apache::OK; #XXX remove when perlio issues are sorted out
   # seek/tell() tests
   #XXX: feel free to enable if largefile support is not enabled in Perl
   if (0) {
  
  
  



cvs commit: modperl-2.0 Changes

2002-06-15 Thread dougm

dougm   2002/06/15 16:56:20

  Modified:.Changes
  Log:
  _03 release
  
  Revision  ChangesPath
  1.24  +1 -1  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.23
  retrieving revision 1.24
  diff -u -r1.23 -r1.24
  --- Changes   15 Jun 2002 02:09:26 -  1.23
  +++ Changes   15 Jun 2002 23:56:20 -  1.24
   -8,7 +8,7 
   
   =over 3
   
  -=item 1.99_03-dev
  +=item 1.99_03 - June 15, 2002
   
   win32 fix for the global Apache-request object to make sure it uses
   the thread local storage mechanism
  
  
  



cvs commit: modperl-2.0/lib mod_perl.pm

2002-06-15 Thread dougm

dougm   2002/06/15 17:02:58

  Modified:.Changes
   lib  mod_perl.pm
  Log:
  bump version
  
  Revision  ChangesPath
  1.25  +2 -0  modperl-2.0/Changes
  
  Index: Changes
  ===
  RCS file: /home/cvs/modperl-2.0/Changes,v
  retrieving revision 1.24
  retrieving revision 1.25
  diff -u -r1.24 -r1.25
  --- Changes   15 Jun 2002 23:56:20 -  1.24
  +++ Changes   16 Jun 2002 00:02:57 -  1.25
   -8,6 +8,8 
   
   =over 3
   
  +=item 1.99_04-dev
  +
   =item 1.99_03 - June 15, 2002
   
   win32 fix for the global Apache-request object to make sure it uses
  
  
  
  1.4   +1 -1  modperl-2.0/lib/mod_perl.pm
  
  Index: mod_perl.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/mod_perl.pm,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- mod_perl.pm   2 Jun 2002 03:25:53 -   1.3
  +++ mod_perl.pm   16 Jun 2002 00:02:58 -  1.4
   -4,7 +4,7 
   use strict;
   
   BEGIN {
  -our $VERSION = 1.9903;
  +our $VERSION = 1.9904;
   }
   
   1;
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 18:07:21

  Added:   src/modules/perl modperl_perl_pp.c modperl_perl_pp.h
  Log:
  new module where any PL_ppaddr modifications are done
  
  Revision  ChangesPath
  1.1  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  #include mod_perl.h
  
  static enum opcode MP_pp_map[] = {
  #ifdef MP_REFGEN_FIXUP
  OP_SREFGEN,
  #endif
  };
  
  typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
  
  static modperl_pp_t MP_PERL_ppaddr[MP_OP_max];
  
  #ifdef MP_REFGEN_FIXUP
  
  /*
   * nasty workaround for bug fixed in bleedperl (11536 + 11553)
   * XXX: when 5.8.0 is released + stable, we will require 5.8.0
   * if ithreads are enabled.
   */
  
  static OP *modperl_pp_srefgen(pTHX)
  {
  dSP;
  OP *o;
  SV *sv = *SP;
  
  if (SvPADTMP(sv)  IS_PADGV(sv)) {
  /* prevent S_refto from making a copy of the GV,
   * tricking it to SvREFCNT_inc and point to this one instead.
   */
  SvPADTMP_off(sv);
  }
  else {
  sv = Nullsv;
  }
  
  /* o = Perl_pp_srefgen(aTHX) */
  o = MP_PERL_ppaddr[MP_OP_SREFGEN](aTHX);
  
  if (sv) {
  /* restore original flags */
  SvPADTMP_on(sv);
  }
  
  return o;
  }
  
  #endif /* MP_REFGEN_FIXUP */
  
  static modperl_pp_t MP_ppaddr[] = {
  #ifdef MP_REFGEN_FIXUP
  MEMBER_TO_FPTR(modperl_pp_srefgen),
  #endif
  };
  
  void modperl_perl_pp_set(modperl_perl_opcode_e idx)
  {
  int pl_idx = MP_pp_map[idx];
  
  /* save original */
  MP_PERL_ppaddr[idx] = PL_ppaddr[pl_idx];
  
  /* replace with our own */
  PL_ppaddr[pl_idx] = MP_ppaddr[idx];
  }
  
  void modperl_perl_pp_set_all(void)
  {
  int i;
  
  for (i=0; iMP_OP_max; i++) {
  modperl_perl_pp_set(i);
  }
  }
  
  void modperl_perl_pp_unset(modperl_perl_opcode_e idx)
  {
  int pl_idx = MP_pp_map[idx];
  
  /* restore original */
  PL_ppaddr[pl_idx] = MP_PERL_ppaddr[idx];
  }
  
  void modperl_perl_pp_unset_all(void)
  {
  int i;
  
  for (i=0; iMP_OP_max; i++) {
  modperl_perl_pp_unset(i);
  }
  }
  
  
  
  1.1  modperl-2.0/src/modules/perl/modperl_perl_pp.h
  
  Index: modperl_perl_pp.h
  ===
  #ifndef MODPERL_PERL_PP_H
  #define MODPERL_PERL_PP_H
  
  #if defined(USE_ITHREADS)  defined(MP_PERL_5_6_x)
  #   define MP_REFGEN_FIXUP
  #endif
  
  typedef enum {
  #ifdef MP_REFGEN_FIXUP
  MP_OP_SREFGEN,
  #endif
  MP_OP_max
  } modperl_perl_opcode_e;
  
  void modperl_perl_pp_set(modperl_perl_opcode_e idx);
  
  void modperl_perl_pp_set_all(void);
  
  void modperl_perl_pp_unset(modperl_perl_opcode_e idx);
  
  void modperl_perl_pp_unset_all(void);
  
  #endif /* MODPERL_PERL_PP_H */
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 18:09:18

  Modified:xs/tables/current/ModPerl FunctionTable.pm
  Log:
  sync
  
  Revision  ChangesPath
  1.72  +54 -19modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm
  
  Index: FunctionTable.pm
  ===
  RCS file: /home/cvs/modperl-2.0/xs/tables/current/ModPerl/FunctionTable.pm,v
  retrieving revision 1.71
  retrieving revision 1.72
  diff -u -r1.71 -r1.72
  --- FunctionTable.pm  3 Jun 2002 23:46:44 -   1.71
  +++ FunctionTable.pm  16 Jun 2002 01:09:18 -  1.72
   -2,7 +2,7 
   
   # !!
   # ! WARNING: generated by ModPerl::ParseSource/0.01
  -# !  Sat May 25 11:12:06 2002
  +# !  Sat Jun 15 17:57:19 2002
   # !  do NOT edit, any changes will be lost !
   # !!
   
   -1355,6 +1355,11 
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'modperl_env_unload',
  +'args' = []
  +  },
  +  {
   'return_type' = 'int',
   'name' = 'modperl_errsv',
   'args' = [
   -2082,6 +2087,24 
   ]
 },
 {
  +'return_type' = 'int',
  +'name' = 'modperl_hook_pre_config',
  +'args' = [
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'p'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'plog'
  +  },
  +  {
  +'type' = 'apr_pool_t *',
  +'name' = 'ptemp'
  +  }
  +]
  +  },
  +  {
   'return_type' = 'void',
   'name' = 'modperl_init',
   'args' = [
   -3175,6 +3198,36 
   ]
 },
 {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_set',
  +'args' = [
  +  {
  +'type' = 'modperl_perl_opcode_e',
  +'name' = 'idx'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_set_all',
  +'args' = []
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_unset',
  +'args' = [
  +  {
  +'type' = 'modperl_perl_opcode_e',
  +'name' = 'idx'
  +  }
  +]
  +  },
  +  {
  +'return_type' = 'void',
  +'name' = 'modperl_perl_pp_unset_all',
  +'args' = []
  +  },
  +  {
   'return_type' = 'SV *',
   'name' = 'modperl_perl_sv_setref_uv',
   'attr' = [
   -3228,24 +3281,6 
 {
   'type' = 'request_rec *',
   'name' = 'r'
  -  }
  -]
  -  },
  -  {
  -'return_type' = 'int',
  -'name' = 'modperl_hook_pre_config',
  -'args' = [
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'p'
  -  },
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'plog'
  -  },
  -  {
  -'type' = 'apr_pool_t *',
  -'name' = 'ptemp'
 }
   ]
 },
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 18:09:46

  Modified:lib/ModPerl Code.pm
  Log:
  integrate modperl_perl_pp module
  
  Revision  ChangesPath
  1.82  +1 -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.81
  retrieving revision 1.82
  diff -u -r1.81 -r1.82
  --- Code.pm   21 May 2002 00:33:33 -  1.81
  +++ Code.pm   16 Jun 2002 01:09:46 -  1.82
   -563,7 +563,7 
   
   my c_src_names = qw(interp tipool log config cmd options callback handler
gtop util io filter bucket mgv pcw global env cgi
  - perl perl_global);
  + perl perl_global perl_pp);
   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 modperl_perl_pp.c modperl_perl_pp.h

2002-06-15 Thread dougm

dougm   2002/06/15 18:20:50

  Modified:src/modules/perl modperl_perl_pp.c modperl_perl_pp.h
  Log:
  stub modperl_pp_require
  
  Revision  ChangesPath
  1.2   +8 -0  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_pp.c 16 Jun 2002 01:07:21 -  1.1
  +++ modperl_perl_pp.c 16 Jun 2002 01:20:50 -  1.2
   -4,6 +4,7 
   #ifdef MP_REFGEN_FIXUP
   OP_SREFGEN,
   #endif
  +OP_REQUIRE
   };
   
   typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
   -47,10 +48,17 
   
   #endif /* MP_REFGEN_FIXUP */
   
  +static OP *modperl_pp_require(pTHX)
  +{
  +/* nothing yet */
  +return MP_PERL_ppaddr[MP_OP_REQUIRE](aTHX);
  +}
  +
   static modperl_pp_t MP_ppaddr[] = {
   #ifdef MP_REFGEN_FIXUP
   MEMBER_TO_FPTR(modperl_pp_srefgen),
   #endif
  +MEMBER_TO_FPTR(modperl_pp_require)
   };
   
   void modperl_perl_pp_set(modperl_perl_opcode_e idx)
  
  
  
  1.2   +1 -0  modperl-2.0/src/modules/perl/modperl_perl_pp.h
  
  Index: modperl_perl_pp.h
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.h,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- modperl_perl_pp.h 16 Jun 2002 01:07:21 -  1.1
  +++ modperl_perl_pp.h 16 Jun 2002 01:20:50 -  1.2
   -9,6 +9,7 
   #ifdef MP_REFGEN_FIXUP
   MP_OP_SREFGEN,
   #endif
  +MP_OP_REQUIRE,
   MP_OP_max
   } modperl_perl_opcode_e;
   
  
  
  



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

2002-06-15 Thread dougm

dougm   2002/06/15 18:34:02

  Modified:src/modules/perl modperl_perl_pp.c
  Log:
  MP_FUNC_T not needed, infact breaks win32
  
  Revision  ChangesPath
  1.3   +1 -1  modperl-2.0/src/modules/perl/modperl_perl_pp.c
  
  Index: modperl_perl_pp.c
  ===
  RCS file: /home/cvs/modperl-2.0/src/modules/perl/modperl_perl_pp.c,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- modperl_perl_pp.c 16 Jun 2002 01:20:50 -  1.2
  +++ modperl_perl_pp.c 16 Jun 2002 01:34:02 -  1.3
   -7,7 +7,7 
   OP_REQUIRE
   };
   
  -typedef OP * MP_FUNC_T(modperl_pp_t)(pTHX);
  +typedef OP * (*modperl_pp_t)(pTHX);
   
   static modperl_pp_t MP_PERL_ppaddr[MP_OP_max];
   
  
  
  



cvs commit: modperl-2.0/lib/Apache Build.pm

2002-06-15 Thread dougm

dougm   2002/06/15 18:58:50

  Modified:lib/Apache Build.pm
  Log:
  hmm, darwin ldflags fixup was not quite good enough
  
  Revision  ChangesPath
  1.98  +4 -1  modperl-2.0/lib/Apache/Build.pm
  
  Index: Build.pm
  ===
  RCS file: /home/cvs/modperl-2.0/lib/Apache/Build.pm,v
  retrieving revision 1.97
  retrieving revision 1.98
  diff -u -r1.97 -r1.98
  --- Build.pm  15 Jun 2002 17:26:29 -  1.97
  +++ Build.pm  16 Jun 2002 01:58:50 -  1.98
   -175,7 +175,10 
   }
   elsif (DARWIN) {
   #not sure how this can happen, but it shouldn't
  -$config-{ldflags} =~ s/-undefined suppress//;
  +my bogus_flags = 'flat_namespace', 'bundle', 'undefined suppress';
  +for my $flag (bogus_flags) {
  +$config-{ldflags} =~ s/-$flag\s*//;
  +}
   }
   
   my $ldopts = ExtUtils::Embed::ldopts();
  
  
  



Re: Thread bug in 5.8RC1 Win32

2002-06-15 Thread Alessandro Forghieri

Greetings.

On Fri, Jun 14, 2002 at 12:44:50PM +0200, Alessandro Forghieri wrote:
 Running NT4SP6, 5.8RC1 compiled debug.
 
 The following session:
 
 D:\Apache2perl -d -e 42
   DB1 ;{use threads;my $var=1;threads-create(sub{$var++})-join();}
 
 Crashes the intepreter, in perl.c:
[...]

Sorry to followup to myself, but I forgot to mention that the creash happens 
*only* from within the debugger (perl -d). The mentioned code runs fine 
otherwise - for instance, from within a file script.

Cheers,
alf




Re: Thread bug in 5.8RC1 Win32

2002-06-15 Thread Jarkko Hietaniemi

In UNIX platforms your test made Perl enter a 100% CPU loop consisting
of SEGVs on top of SEGVs on top of SEGVS...  the below hopefully fixes:

Change 17250 by jhi@alpha on 2002/06/15 15:34:51

Possible cure for

Subject: Re: Thread bug in 5.8RC1 Win32
From: Alessandro Forghieri [EMAIL PROTECTED]
Date: Sat, 15 Jun 2002 12:56:35 +0200
Message-ID: [EMAIL PROTECTED]

Affected files ...

... //depot/perl/perl.c#441 edit

Differences ...

 //depot/perl/perl.c#441 (text) 
Index: perl/perl.c
--- perl/perl.c#440~17194~  Wed Jun 12 04:35:57 2002
+++ perl/perl.c Sat Jun 15 18:34:51 2002
@@ -442,7 +442,8 @@
 
 /* Destroy the main CV and syntax tree */
 if (PL_main_root) {
-   PL_curpad = AvARRAY(PL_comppad);
+/* If running under -d may not have PL_comppad. */
+PL_curpad = PL_comppad ? AvARRAY(PL_comppad) : NULL;
op_free(PL_main_root);
PL_main_root = Nullop;
 }
End of Patch.


-- 
$jhi++; # http://www.iki.fi/jhi/
# There is this special biologist word we use for 'stable'.
# It is 'dead'. -- Jack Cohen



Stuck loading startup.pl in Apache2 on WinNT

2002-06-15 Thread Douglas McCarthy

I can't get Apache2 to start with mod_perl.
I could on Linux, but am having trouble on NT.
The launch gets stuck in startup.pl

Apache finds startup.pl but complains that it can't locate Apache.pm in 
INC. Trouble is, it's there.

I've played with the eagle book startup.pl (not to mention Stas 
Beckman's as well) and put the use lib line at the top of the BEGIN block.

Whatever I do, the error message is :

Compilation failed in require at (eval 1) line 3(or whatever line use 
Apache(); is on.

... Can't load Perl file: startup.pl for server localhost:8080, exiting...


Can anyone help out.

BTW I'm using the binary installation of Apache2, the relevant 
references are:

Apache/2.0.36 (Win32)
mod_perl/1.99_02-dev
Perl/v5.6.1 (ActiveState)

TIA

Doug






htaccess

2002-06-15 Thread Tiago Almeida



Hello,
Can anyone tell me if theres any way to authenticate automatically to a
htaccess protected web page with a Perl script, sending the user name
and the password to the login box? 
i don't to open the web page , but i want to process some data in it.
does any knows some module to do that

Best regards
tsa




Re: Stuck loading startup.pl in Apache2 on WinNT

2002-06-15 Thread Doug MacEachern

On Sat, 15 Jun 2002, Douglas McCarthy wrote:

 I can't get Apache2 to start with mod_perl.
 I could on Linux, but am having trouble on NT.
 The launch gets stuck in startup.pl
 
 Apache finds startup.pl but complains that it can't locate Apache.pm in 
 INC. Trouble is, it's there.

you shouldn't be trying to load Apache.pm with 2.x
if something is, you must have Apache::compat loaded first which makes 
'use Apache ()' a noop.




Re: htaccess

2002-06-15 Thread Jim Martinez

On Jun 15  Tiago Almeida wrote:
 
 
 Hello,
 Can anyone tell me if theres any way to authenticate automatically to a
 htaccess protected web page with a Perl script, sending the user name
 and the password to the login box? 
 i don't to open the web page , but i want to process some data in it.
 does any knows some module to do that
 
 Best regards
 tsa
 

This may help:

http://www.perldoc.com/perl5.6.1/lib/LWP/UserAgent.html

Jim




Re: htaccess

2002-06-15 Thread Tiago Almeida

Thanks Jim 
Thats just right

regards
tsa
On Sat, 2002-06-15 at 18:38, Jim Martinez wrote:
 On Jun 15  Tiago Almeida wrote:
  
  
  Hello,
  Can anyone tell me if theres any way to authenticate automatically to a
  htaccess protected web page with a Perl script, sending the user name
  and the password to the login box? 
  i don't to open the web page , but i want to process some data in it.
  does any knows some module to do that
  
  Best regards
  tsa
  
 
 This may help:
 
 http://www.perldoc.com/perl5.6.1/lib/LWP/UserAgent.html
 
 Jim
 
 





Re: htaccess

2002-06-15 Thread Ron Pero

Yes. Use the LWP module, LWP::UserAgent. Its credentials() method lets you
add the username and password to the request.

At 05:25 PM 06/15/02 +0100, Tiago Almeida wrote:


Hello,
Can anyone tell me if theres any way to authenticate automatically to a
htaccess protected web page with a Perl script, sending the user name
and the password to the login box? 
i don't to open the web page , but i want to process some data in it.
does any knows some module to do that

Best regards
tsa





Re: MVC Topic Joy

2002-06-15 Thread Perrin Harkins

 In most cases the Handler is set to view, in which case View.pm
 instantiates other modules objects, (and those instantiations use
other
 url string data to determine what to construct into the object). View
 then just spits out the default head, body (created with the other
 objects) and footer.

 All of the real work is done by the other modules. View.pm could
care
 less what comes back from $html_obj-view_data. It just adds the
result
 to $body. It's the html module's job to fill the return from view_data
 with the correct information.

It sounds like you have a system that works well for you, and that's
what really matters.  I would probably try to get this default HTML that
View.pm puts out into the same place the rest of your HTML is created,
especially since it seems like View.pm is responsible for interpreting
request data and calling methods on model objects.  (View.pm is maybe a
somewhat misleading name, since it isn't the part that generates the
HTML view.)

- Perrin




Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins

 WO is amazing, no two ways about it.  Once you use it, everything else
 sucks.  There are no exceptions.

That's kind of a rude statement to make on this list, where all of these
people are offering free software and support to you.

It's been a few years since I last evaluated WebObjects, but it
certainly didn't seem like a panacea.  It had a number of interesing
ideas behind it, but its insistence on trying to hide all the details of
the browser interaction made some simple things very hard, especially
since it tried to keep all of the state information server-side.  The
problems it had with back buttons and multiple browser windows come to
mind.  It also seems to encourage design where browsers directly request
a view, rather than calling a controller which chooses a view depending
on the outcome of processing.  That could be just a shortcoming of their
introductory documentation though.

- Perrin




Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins

 My general motto is tiers eq tears ... I've never seen
 a really comfortable OO/SQL bridge.

So who's talking about an OO/SQL bridge?  Not me.  At least not an
automatic one.  I write the SQL by hand.

 Group bys, order bys, multi-table selects, locking, SQL query
 plans and index optimisation all rightfully belong to the database but
are
 an anathema to a simple OO/SQL bridge.

I use all of those things in my model objects.  The model objects use
SQL to implement methods like $product-user_comments() or
$address-save(), and sometimes it is complex.  The point is that the
rest of the application gets to the database through the model objects,
rather than through SQL.  Encapsulation, reuse, blah blah blah.

 Generally I try to minimise the layers/tiers/abstraction between
 the front-end and the database - for me OO/SQL abstraction is
something
 akin to 'GOTO considered harmful'.

I think you're overgeneralizing based on some kind of O/R mapping tool
you've used that tried to do too much.  Wrapping up the knowledge of how
to work with the database to accomplish certain tasks inside of objects
is no different from any other application of OO programming.

- Perrin




Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins

 This approach works for some things, but I think it falls down when it
 comes to doing complex database searches, particularly searches
generated
 ad-hoc on multiple columns in multiple tables.

In general, the user interface you provide for a search will be much
higher-level than the SQL that implements it.  That's what is gained by
making this kind of object: it's a place to put the translation of the
business concept find people in New Jersey into the four table join
that might be needed to find them.

 This is why Alzabo is much lower-level than what you have above.  I
needed
 something where I could easily construct queries that might include 1+
 tables, with various types of searches of individual columns in those
 tables (equal to, between, less than, like, etc.) with dynamic sorting
 (again, on any of the columns in any of the tables, ascending or
 descending).

I would just write SQL at that point, but I do realize that Alzabo
provides more database independence.  You could easilly use Alzabo to
build the queries that implement the model objects I'm talking about.

 With what you're proposing, I think you could easily end up with
either:

 A) a ridiculously flexible interface that looks sort of like SQL,
except
 where it is SQL, except where it's only sort of like SQL, etc.

 B) a ridiculous profusion of classes, methods, or both.

I think you're overestimating the number of search variations and model
objects that most applications have.  For example, Fran's application
generates his stale watches report.  There's no need to create a
fully-parameterized search interface to Watch objects just for that.
Instead, you make a Watches-find_stale() method or something and keep
the knowledge of what that means to the database hidden behind that API.

At eToys we had a very large and complex (highly normalized) database,
and this approach worked very well.  I think it works best when you have
a complex database requiring complex SQL, because if you just have a
bunch of simple 1-1 table mappings there isn't really much to abstract.

I'm thinking of trying out SPOPS the next time I do this kind of thing,
because it will automatically handle the no-brainer cases (1-1 mappings)
and allow me to write the SQL for the complex cases by hand, all with a
consistent interface and hooks for caching, etc.

 Trying to jam a thick layer of OO-goodness over relational data is
asking
 for a mess.  OO has its place, but if your application is primarily
about
 the database, I don't think that a heavy OO layer on top of that will
do
 you much good.

There's nothing thick or heavy about the way I do it.  There is no
automatic SQL generation, and nothing to prevent me from using any SQL
tricks that my database supports.  It's just a way of wrapping up chunks
of code that implement data-related tasks into an easy task-oriented API
for the controller (or other model objects) to act on.

- Perrin




Re: separating C from V in MVC

2002-06-15 Thread Perrin Harkins

 An Object-Relational mapper takes objects and stores them in a
relational
 database, as transparently as possible.  I think the most pure example
of
 this I've seen in the Perl world is Tangram
(www.tangram-persistence.org).
 SPOPS is also an O-R mapper (actually, its a generic Object
persistence
 mechanism but it seems to most feature-rich when used with an RDBMS).

 A Relational-Object takes a relational database, and provides access
to it
 (select, insert, update, delete) via objects.  Class::DBI, Alzabo, and
 DBIx::RecordSet are examples of such a beast.

I would actually put Class::DBI in with the first set.

To me the difference is not O/R vs R/O, since both of them go both
directions.  Rather it's a question of what you're modelling in your
objects.  Things like Tangram model the domain objects, i.e. concerts,
seats, people.  Things like Alzabo model the database objects, i.e.
tables, rows, foreign keys.

My approach falls in the first camp, although I don't currently use any
OOP tools for assistance.

- Perrin




Re: Stuck loading startup.pl in Apache2 on WinNT

2002-06-15 Thread Alexandre Sebrao

HI! CAN ANYONE Send me a e-mail that cancel to receives this e-mail list!

Thx!



Re: Stuck loading startup.pl in Apache2 on WinNT

2002-06-15 Thread Alexandre Sebrao

HI! CAN ANYONE Send me a e-mail that cancel to receives this e-mail list!

Thx!



Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Kyle Dawkins

Perrin al

  Once you use it, everything else
  sucks.  There are no exceptions.
 That's kind of a rude statement to make on this list, where all of these
 people are offering free software and support to you.

Ah, you're right; I actually never meant that as a slight against things
mod_perl; I use mod_perl and I support it fervently.  But mod_perl  WO are
at two different places in the stack; WO is a rich framework, mod_perl is an
all-powerful skeleton on which we *build* our frameworks.

 It's been a few years since I last evaluated WebObjects, but it
 certainly didn't seem like a panacea.  It had a number of interesing
 ideas behind it, but its insistence on trying to hide all the details of
 the browser interaction made some simple things very hard, especially
 since it tried to keep all of the state information server-side.  The
 problems it had with back buttons and multiple browser windows come to
 mind

Might have been a problem a long time ago but it's certainly not now. WO
supports both its own kind of steroid-enhanced session tracking, which does
create problems with back-buttons if you don't use it properly, but it also
supports regular mod_perl-style request/response cycles that are perfectly
fine with back-button/multiple-window/bookmarking tasks.

 It also seems to encourage design where browsers directly request
 a view, rather than calling a controller which chooses a view depending
 on the outcome of processing.  That could be just a shortcoming of their
 introductory documentation though.

Not quite sure what you mean here.  The general WO request-response loop is
1 Process request
2 Perform action
3 Return response

Step 3 is entirely dependent on the previous two, just like any
mod_perl/CGI/php app.

WO completely forces division of your C  your V and gives you a huge hand
in separating your M from either of those.

Anyway, sorry if anyone was slighted; I think the most perfect web
development env would be a WO-style framework build on top of mod_perl
(because who wants to use Java? Jeez)

Cheers

Kyle Dawkins
Central Park Software





[OT] what drives Amazon?

2002-06-15 Thread F. Xavier Noria

Does anybody know which is the technology behind Amazon?

-- fxn




Re: [OT] WebObjects [Was: Re: separating C from V in MVC]

2002-06-15 Thread Perrin Harkins

 Not quite sure what you mean here.  The general WO request-response
loop is
 1 Process request
 2 Perform action
 3 Return response

 Step 3 is entirely dependent on the previous two, just like any
 mod_perl/CGI/php app.

The introductory documentation makes it look each URL is tied to a
specific HTML template.  It may just be a problem with that
documentation though.

 I think the most perfect web
 development env would be a WO-style framework build on top of mod_perl

You can assemble various parts of it from CPAN.  Most of the perl O/R
frameworks are not as ambitious as EOF, but Tangram is trying pretty
hard.  The templating tools available for perl are as good as the ones
in WO.  Using those with one of the MVC frameworks discussed here gets
you quite a bit.  The main thing you don't get is GUI tools, which there
doesn't seem to be much demand for from the mod_perl community.

- Perrin




Re: [OT] what drives Amazon?

2002-06-15 Thread Perrin Harkins

 Does anybody know which is the technology behind Amazon?

If you look at their job listings, you'll see it's a lot of C/C++ and
Perl, with a smattering of other things, running on Unix.  That's pretty
typical of the really big sites.

- Perrin





Re: [OT] what drives Amazon?

2002-06-15 Thread Peter Bi

Hi, any comments on Java Servlet, .NET, mod_Perl and others such as
ColdFusion ?  I personally was asked for such question a few days ago. The
other side needs a service like UPS.com. What do people on this mailing list
think about ?

Peter Bi

- Original Message -
From: Perrin Harkins [EMAIL PROTECTED]
To: F. Xavier Noria [EMAIL PROTECTED]; [EMAIL PROTECTED]
Sent: Saturday, June 15, 2002 4:36 PM
Subject: Re: [OT] what drives Amazon?


  Does anybody know which is the technology behind Amazon?

 If you look at their job listings, you'll see it's a lot of C/C++ and
 Perl, with a smattering of other things, running on Unix.  That's pretty
 typical of the really big sites.

 - Perrin







ANNOUNCE: mod_perl-1.99_03

2002-06-15 Thread Doug MacEachern

The URL

http://perl.apache.org/dist/mod_perl-1.99_03.tar.gz

has entered CPAN as

  file: $CPAN/authors/id/D/DO/DOUGM/mod_perl-1.99_03.tar.gz
  size: 391039 bytes
   md5: 36f7beae83234a20217096046e3d73ff

Changes since 1.99_02:

win32 fix for the global Apache-request object to make sure it uses
the thread local storage mechanism

add a reference count mechanism to interpreters for use in threaded MPMs,
so if APR::Pool cleanups have been registered the interpreter is not
putback into the interpreter pool until all cleanups have run.

unbuffer STDERR (by turning on autoflush by default)

add support for Perl*Handler +Apache::Foo

fix open_logs,post_config,child_init hooks to run in the proper order

adjust to apr_bucket_type_t changes in 2.0.37-dev
[Mladen Turk [EMAIL PROTECTED]]

add MODPERL2 config define, as if the server had been started with -DMODPERL2

compat additions and fixes: $r-lookup_{file,uri}, $r-is_main, Apache-define

added compat for Apache::log_error [Stas Bekman]

---

Enjoy,
-Doug




Re: [OT] what drives Amazon?

2002-06-15 Thread Todd Chapman


There were a lot or perl coders when I was there for a short consulting
gig. Wonder if any of my perl code still survives...

-Todd

On Sun, 16 Jun 2002, F. Xavier Noria wrote:

 Does anybody know which is the technology behind Amazon?
 
 -- fxn
 




[ANNOUNCE] HTML::Template::JIT 0.03

2002-06-15 Thread Sam Tregar

HTML::Template::JIT - a just-in-time compiler for HTML::Template

CHANGES

- Added support for case_sensitive option to new().

- Added new print_to_stdout option to new() to have output
  printed to STDOUT as it is generated.

- Added support for ESCAPE.  Template syntax support is now
  complete

- Improved the quality of generated code - variables are now
  looked-up once and stored in lexical variables.  This has
  improved performance a small amount.

- Fixed bug in escaping of template text.  This caused templates
  containing the characters any of ($, @, %, \) to be rendered
  incorrectly.  Thanks to Smejkal Petr for the report.

- Fixed bug where parameters from previous runs were persisting
  across calls to new().  Thanks to Tugrul Galatali for the spot.

- Arguments to new() that modify the compiled object are now
  included in hashing to create package names.  This means that
  a single template can be used with different options and
  different compiled objects will be generated.  Thanks to
  Tugrul Galatali for the spot.


DESCRIPTION

This module provides a just-in-time compiler for HTML::Template.
Templates are compiled into native machine code using Inline::C.  The
compiled code is then stored to disk and reused on subsequent calls.

HTML::Template::JIT is up to 8 times as fast as HTML::Template using
caching.


NOTE

This module is not feature-complete.  Be sure to read the CAVEATS
section in the documentation before using!


AVAILABILITY

This module is available on SourceForge.  Download it at:

  http://prdownloads.sf.net/html-template/HTML-Template-JIT-0.03.tar.gz?download

The module is also available on CPAN.  You can get it using CPAN.pm or
go to:

  http://www.cpan.org/authors/id/S/SA/SAMTREGAR/


CONTACT INFO

You can join the HTML::Template mailing-list by sending a blank
message to [EMAIL PROTECTED]