richter     01/01/15 12:17:39

  Modified:    .        Changes.pod Faq.pod MANIFEST epmain.c test.pl
               test/cmp epobless2.htm
               test/html/EmbperlObject eposubs.htm
               test/html/EmbperlObject/sub epobless2.htm eposubs2.htm
  Added:       test/cmp epobless3.htm
               test/html/EmbperlObject/sub epobless3.htm
  Log:
     - Corrected a problem that leads to very strange errors when an
       Embperl sub is called from an in memory source (that is passed
       via the Execute input parameter). Spotted by Neil Gunton.
  
  Revision  Changes    Path
  1.150     +3 -0      embperl/Changes.pod
  
  Index: Changes.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Changes.pod,v
  retrieving revision 1.149
  retrieving revision 1.150
  diff -u -r1.149 -r1.150
  --- Changes.pod       2001/01/08 04:20:04     1.149
  +++ Changes.pod       2001/01/15 20:17:32     1.150
  @@ -11,6 +11,9 @@
      - Added object and isa parameters to Execute, which allows to get an
        object reference for a certain file and set the Perl inherence
        hierachive. Ideas from Neil Gunton and Angus Lees.
  +   - Corrected a problem that leads to very strange errors when an
  +     Embperl sub is called from an in memory source (that is passed
  +     via the Execute input parameter). Spotted by Neil Gunton.
   
   
   =head1 1.3.0 (RELEASE)   4 Dec. 2000
  
  
  
  1.19      +11 -1     embperl/Faq.pod
  
  Index: Faq.pod
  ===================================================================
  RCS file: /home/cvs/embperl/Faq.pod,v
  retrieving revision 1.18
  retrieving revision 1.19
  diff -u -r1.18 -r1.19
  --- Faq.pod   2000/11/15 08:15:40     1.18
  +++ Faq.pod   2001/01/15 20:17:32     1.19
  @@ -103,6 +103,10 @@
   =head2 Running 'make test' fails with an error message at loading of Embperl 
   (even though mod_perl compiled and tested cleanly!)
   
  +see "I get symbol ap_* undefined/cannot resolve ap_*"
  +
  +=head2 I get symbol ap_* undefined/cannot resolve ap_*
  +
   This can happen when symbols in the Apache binary can not be found or
   are not being resolved correctly.
   
  @@ -129,6 +133,10 @@
   Try rebuilding Apache and mod_perl from scratch, and make sure
   you do not strip symbols out of either.
   
  +On some systems/linker you need to tell the linker explicitly to
  +export such symbols. For example FreeBSD linker needs the 
  +C<-export-dynamic> option.
  +
   If you don't succeed with this approach, try statically linking
   Embperl to Apache/mod_perl (please see the next question for
   step-by-step instructions on how to do this).
  @@ -322,7 +330,9 @@
   =head2 Embperl and mod_perl on AIX 
   
   You need at least mod_perl 1.22. For mod_perl 1.22 and higher Embperl
  -should compile out of the box on AIX.
  +should compile out of the box on AIX. If you run into problems with
  +undefined symbols (like C<ap_*>) make sure you have the newest 
  +mod_perl version (as of this writing this is mod_perl 1.24_01).
   
   
   =head2 Embperl does not write to the logfile, because of missing permissions
  
  
  
  1.61      +2 -0      embperl/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /home/cvs/embperl/MANIFEST,v
  retrieving revision 1.60
  retrieving revision 1.61
  diff -u -r1.60 -r1.61
  --- MANIFEST  2001/01/10 06:21:22     1.60
  +++ MANIFEST  2001/01/15 20:17:32     1.61
  @@ -164,6 +164,7 @@
   test/html/EmbperlObject/sub/epobless.htm
   test/html/EmbperlObject/sub/eposubs2.htm
   test/html/EmbperlObject/sub/epobless2.htm
  +test/html/EmbperlObject/sub/epobless3.htm
   test/html/EmbperlObject/obj/epobase.htm
   test/html/EmbperlObject/obj/epohead.htm
   test/html/EmbperlObject/obj/epofoot.htm
  @@ -267,6 +268,7 @@
   test/cmp/epobaselib.htm
   test/cmp/epobless.htm
   test/cmp/epobless2.htm
  +test/cmp/epobless3.htm
   test/cmp/getbsess.htm
   test/cmp/delrdsess.htm     
   test/cmp/delwrsess.htm
  
  
  
  1.90      +32 -5     embperl/epmain.c
  
  Index: epmain.c
  ===================================================================
  RCS file: /home/cvs/embperl/epmain.c,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- epmain.c  2000/12/03 13:54:34     1.89
  +++ epmain.c  2001/01/15 20:17:33     1.90
  @@ -1822,8 +1822,9 @@
       char     txt [sizeof (sDefaultPackageName) + 50] ;
       char *   cache_key;
       int              cache_key_len;
  -    char olddir[PATH_MAX] = "" ;
  -    
  +    char     olddir[PATH_MAX] = "" ;
  +    char *      pNew ;
  +
       EPENTRY (SetupFileData) ;
   
       /* Have we seen this sourcefile/package already ? */
  @@ -1881,6 +1882,7 @@
                f -> pExportHash = NULL ;
                }
            }
  +        pNew = "Found " ;
           }
       else
           { /* create new file structure */
  @@ -1914,7 +1916,12 @@
       
           if (r -> bDebug)
               lprintf (r, "[%d]MEM: Load %s in %s\n", r -> nPid,  sSourcefile, f -> 
sCurrPackage) ;
  +        pNew = "New " ;
           }
  +
  +    if (r -> bDebug)
  +        lprintf (r, "[%d]CACHE: %s File for %s (%x) in %s hash cache-key %s\n", r 
-> nPid,  pNew, f -> sSourcefile, f, f -> sCurrPackage, cache_key) ;
  +    
       _free(r,cache_key);
   
       return f ;
  @@ -1938,6 +1945,7 @@
       char *   cache_key;
       int              cache_key_len;
       char olddir[PATH_MAX] = "" ;
  +    char *      pNew ;
       
       EPENTRY (GetFileData) ;
   
  @@ -1990,7 +1998,9 @@
                f -> pExportHash = NULL ;
                }
            }
  -        }
  +
  +        pNew = "Found " ;
  +     }
       else
           { /* create new file structure */
           if ((f = malloc (sizeof (*f))) == NULL)
  @@ -2021,7 +2031,13 @@
   
           hv_store(pCacheHash, cache_key, cache_key_len, newRV_noinc (newSViv 
((IV)f)), 0) ;  
       
  -        }
  +        pNew = "New " ;
  +     }
  +
  +    if (pCurrReq -> bDebug)
  +        lprintf (pCurrReq, "[%d]CACHE: %s File for %s (%x) in %s hash cache-key 
%s\n", pCurrReq -> nPid,  pNew, f -> sSourcefile, f, f -> sCurrPackage, cache_key) ;
  +    
  +
       free(cache_key);
   
       return f ;
  @@ -2943,6 +2959,9 @@
       r -> Buf.pSourcelinePos = r -> Buf.pCurrPos = r -> Buf.pBuf ;
       r -> Buf.pEndPos  = r -> Buf.pBuf + nFileSize ;
   
  +    /*xxx*/lprintf (r, "ProcessFile  r -> Buf.pFile=%x\n", r -> Buf.pFile) ;
  +
  +
   #ifdef EP2
       if (!r -> bEP1Compat)
        {
  @@ -3025,6 +3044,7 @@
       char *  p ;
       int     n ;
   
  +    /*xxx*/lprintf (r, "ProcessBlock nBlockStart=%d nBlockNo=%d  r -> 
Buf.pFile=%x\n", nBlockStart, nBlockNo, r -> Buf.pFile) ;
   
       r -> Buf.pCurrPos = r -> Buf.pBuf + nBlockStart ;
       r -> Buf.pEndPos  = r -> Buf.pCurrPos + nBlockSize ;
  @@ -3161,6 +3181,8 @@
   
       if ((pBufSV = r -> Buf.pFile -> pBufSV) == NULL || !SvPOK (pBufSV))
        {
  +     /*xxx*/lprintf (r, "ReadInputFile r -> pInData=%x rok=%d\n", r -> pInData, 
SvROK(r -> pInData)) ;
  +
        if (SvROK(r -> pInData))
            { /* --- get input from memory --- */
            STRLEN n ;
  @@ -3224,6 +3246,7 @@
       tSrcBuf Buf ;
       char *  sEvalPackage = r -> Buf.sEvalPackage ; 
       STRLEN  nEvalPackage = r -> Buf.nEvalPackage ;  
  +    SV *    pInData      = r -> pInData  ;  
   
   
       /*av_unshift (GvAV (PL_defgv), 1) ;
  @@ -3231,11 +3254,14 @@
       
       memcpy (&Buf, &r -> Buf, sizeof (Buf)) ;
   
  +    /*xxx*/lprintf (r, "ProcessSub pFile=%x nBlockStart=%d nBlockNo=%d  r -> 
Buf.pFile=%x\n", pFile, nBlockStart, nBlockNo, r -> Buf.pFile) ;
       
       if (pFile != r -> Buf.pFile)
        { /* get other file */
        r -> Buf.pFile = pFile ;
  +     r -> pInData = &sv_undef ;
   
  +     /*xxx*/lprintf (r, "ProcessSub call ReadInputFile\n") ;
        if ((rc = ReadInputFile (r)) != ok)
            {
            LogError (r, rc) ;
  @@ -3256,7 +3282,8 @@
       memcpy (&r -> Buf, &Buf, sizeof (Buf)) ;
       r -> Buf.sEvalPackage = sEvalPackage ; 
       r -> Buf.nEvalPackage = nEvalPackage ; 
  -
  +    r -> pInData          = pInData ;  
  +    
       if (rc != ok)
        LogError (r, rc) ;
   
  
  
  
  1.90      +5 -0      embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.89
  retrieving revision 1.90
  diff -u -r1.89 -r1.90
  --- test.pl   2001/01/10 06:21:22     1.89
  +++ test.pl   2001/01/15 20:17:33     1.90
  @@ -439,6 +439,11 @@
           'cgi'        => 0,
           'repeat'     => 2,
           },
  +    'EmbperlObject/sub/epobless3.htm' => { 
  +        'offline'    => 0,
  +        'cgi'        => 0,
  +        'repeat'     => 2,
  +        },
       'EmbperlObject/obj/epoobj1.htm' => { 
           'offline'    => 0,
           'cgi'        => 0,
  
  
  
  1.2       +23 -0     embperl/test/cmp/epobless2.htm
  
  Index: epobless2.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/cmp/epobless2.htm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- epobless2.htm     2001/01/10 06:21:23     1.1
  +++ epobless2.htm     2001/01/15 20:17:36     1.2
  @@ -10,6 +10,29 @@
   
   txt2: txt2 from base dir <br>
   
  +eposub1: 
  +
  +<h1>eposub1</h1>
  +
  +<br>
  +
  +eposub2: 
  +
  +<h1>eposub2</h1>
  +
  +<br>
  +
  +
  +eposub1: 
  +
  +<h1>eposub1</h1>
  +
  +<br>
  +eposub2: 
  +
  +<h1>eposub2</h1>
  +
  +<br>
   
    <hr> Footer <hr>
    
  
  
  
  1.1                  embperl/test/cmp/epobless3.htm
  
  Index: epobless3.htm
  ===================================================================
   <html>
   <head>
   <title>Example</title>
   </head>
   <body>
    <h1>another head from sub</h1>
  
  
  eposub1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
  
  <h1>eposub1</h1>
  
  <br>
  eposub1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa 
  
  <h1>eposub1</h1>
  
  <br>
  eposub2: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 
  
  <h1>eposub2</h1>
  
  <br>
  eposub2: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb 
  
  <h1>eposub2</h1>
  
  <br>
  
   <hr> Footer <hr>
   
   
  
  </body>
   </html>
  
  
  
  
  1.2       +8 -0      embperl/test/html/EmbperlObject/eposubs.htm
  
  Index: eposubs.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/EmbperlObject/eposubs.htm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- eposubs.htm       2000/12/23 20:13:27     1.1
  +++ eposubs.htm       2001/01/15 20:17:37     1.2
  @@ -8,3 +8,11 @@
   
   
   ** base dir **
  +
  +
  +[$ sub eposub2 $]
  +
  +[- $n = 2 -]
  +<h1>eposub[+ $n +]</h1>
  +
  +[$endsub$]
  
  
  
  1.2       +14 -0     embperl/test/html/EmbperlObject/sub/epobless2.htm
  
  Index: epobless2.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/EmbperlObject/sub/epobless2.htm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- epobless2.htm     2001/01/10 06:21:23     1.1
  +++ epobless2.htm     2001/01/15 20:17:38     1.2
  @@ -6,3 +6,17 @@
   
   txt2: [+ $subs -> txt2 +] <br>
   
  +eposub1: [- $subs -> eposub1 -] <br>
  +
  +eposub2: [- $subs -> eposub2 -] <br>
  +
  +
  +[-
  +$src1 = "eposub1: \[- \$subs -> eposub1 -\] \<br>" ;
  +
  +$src2 = "eposub2: \[- \$subs -> eposub2 -\] \<br>" ;
  +
  +Execute ({inputfile => "eposrc1", package => __PACKAGE__, input => \$src1}) ;
  +
  +Execute ({inputfile => "eposrc2", package => __PACKAGE__, input => \$src2}) ;
  +-]
  \ No newline at end of file
  
  
  
  1.2       +7 -0      embperl/test/html/EmbperlObject/sub/eposubs2.htm
  
  Index: eposubs2.htm
  ===================================================================
  RCS file: /home/cvs/embperl/test/html/EmbperlObject/sub/eposubs2.htm,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- eposubs2.htm      2001/01/10 06:21:23     1.1
  +++ eposubs2.htm      2001/01/15 20:17:38     1.2
  @@ -12,3 +12,10 @@
   
   ** same dir **
   
  +
  +[$ sub eposub1 $]
  +
  +[- $n = 1 -]
  +<h1>eposub[+ $n +]</h1>
  +
  +[$endsub$]
  \ No newline at end of file
  
  
  
  1.1                  embperl/test/html/EmbperlObject/sub/epobless3.htm
  
  Index: epobless3.htm
  ===================================================================
  
  [- $subs = Execute ({'object' => 'eposubs2.htm'}) -]
  
  
  [-
  $src1 = "eposub1: aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa \[- \$subs 
-> eposub1 -\] \<br>" ;
  
  $src2 = "eposub2: bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb \[- \$subs 
-> eposub2 -\] \<br>" ;
  
  Execute ({inputfile => "eposrc1", package => __PACKAGE__, input => \$src1}) ;
  
  Execute ({inputfile => "eposrc1", package => __PACKAGE__, input => \$src1}) ;
  
  Execute ({inputfile => "eposrc2", package => __PACKAGE__, input => \$src2}) ;
  
  Execute ({inputfile => "eposrc2", package => __PACKAGE__, input => \$src2}) ;
  -]
  
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to