Gerald, I think the app object logic in Embperl::Object::Execute() is
wrong.  It seems to always recreate the application object, where it
should only do it once.  Looking at the code, it never seems to check
if $packages{"$fn::$appfn"} already exists before creating a new app
object.

Now that I think about it further, is "$fn::$appfn" the right key to
use here - do we *want* a new app object for each base file?  Surely
we should just be caching this against the appname or something.


In case I've missed the mark completely, the bug I'm seeing is this:

I've got an (offline) perl loop that repeatedly calls:
    my $rc = Embperl::Object::Execute({inputfile => $inpath,
                                       outputfile => $outpath,
                                       appname => 'gusweb',
                                       object_app => '_app.pl',
                                      });

and I'm seeing the application object get created and work correctly
on the first request - but the second request gets:

 [24276]ERR:  24:  Error in Perl code: Can't locate object method "init" via 
package "Embperl::__4" at /usr/lib/perl5/Embperl/Object.pm line 314, <$inv> 
line 5.

and the third gets:

 [24276]ERR:  32:  Warning in Perl code: Subroutine init redefined at 
/home/gus/public_html/gus/_app.pl line 12, <$inv> line 8.
 [24276]ERR:  32:  Warning in Perl code: Subroutine get_recipe redefined at 
/home/gus/public_html/gus/_app.pl line 23, <$inv> line 8.

the fourth gets:

 [24276]ERR:  24:  Error in Perl code: Can't locate object method "init" via 
package "Embperl::__4" at /usr/lib/perl5/Embperl/Object.pm line 314, <$inv> 
line 32.

the fifth gets the "subroutine redefined" errors, etc.

dbgObjectSearch log attached.

 - Gus

[24276]REQ: ***** Start Request at Thu Aug  4 21:01:27 2005
[24276]Use App: gusweb
[24276]Embperl::Object Request Filename: /home/gus/public_html/gus/configs.html
[24276]Embperl::Object basename: _base.epl
[24276]Embperl::Object Check for base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object Found Base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object path: /home/gus/public_html/gus
[24276]Embperl::Object import new Base: /home/gus/public_html/gus/_base.epl
[24276] Use Recipe Embperl
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]SYNTAX: switch to Embperl::Syntax::Embperl
[24276]Reading /home/gus/public_html/gus/_base.epl as input using PerlIO (890 
Bytes)...
[24276]PERF: Parse Start Time:      10 ms 
[24276]PERF: Parse End Time:                10 ms 
[24276]PERF: Parse Time:                    0 ms 
[24276]PERF: DOMSTAT: MemUsage = 67088 Bytes  numNodes = 33  numLevelLookup = 0 
 numLevelLookupItem = 0  numStr = 95  numReplace = 0  
[24276]PERF: Compile Start Time:            10 ms 
[24276]PERF: Compile End Time:      10 ms 
[24276]PERF: After Compile Exec End Time: 10 ms 
[24276]PERF: Perl Compile End Time:         10 ms 
[24276]PERF: Compile Time:                  0 ms 
[24276]PERF: DOMSTAT: MemUsage = 68128 Bytes  numNodes = 28  numLevelLookup = 0 
 numLevelLookupItem = 0  numStr = 95  numReplace = 3  
[24276]Embperl::Object import base finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__1 
[24276]Embperl::Object import new Application: _app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]SYNTAX: switch to Embperl::Syntax::Perl
[24276]Embperl::Object import new Application finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__2
[24276]Embperl::Object import new file: /home/gus/public_html/gus/configs.html
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]SYNTAX: switch to Embperl::Syntax::Embperl
[24276]Reading /home/gus/public_html/gus/configs.html as input using PerlIO 
(2084 Bytes)...
[24276]PERF: Parse Start Time:      10 ms 
[24276]PERF: Parse End Time:                10 ms 
[24276]PERF: Parse Time:                    0 ms 
[24276]PERF: DOMSTAT: MemUsage = 96032 Bytes  numNodes = 101  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 134  numReplace = 3  
[24276]PERF: Compile Start Time:            10 ms 
[24276]PERF: Compile End Time:      20 ms 
[24276]PERF: After Compile Exec End Time: 20 ms 
[24276]PERF: Perl Compile End Time:         20 ms 
[24276]PERF: Compile Time:                  10 ms 
[24276]PERF: DOMSTAT: MemUsage = 97072 Bytes  numNodes = 92  numLevelLookup = 0 
 numLevelLookupItem = 0  numStr = 134  numReplace = 6  
[24276]Embperl::Object import file finished: 
/home/gus/public_html/gus/configs.html, package = Embperl::__3
[24276]Open /home/gus/public_html/gus/../gus.out//configs.html for output...
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]Search for /home/gus/public_html/gus/configs.html
[24276]Search: nothing to search return /home/gus/public_html/gus/configs.html
[24276]PERF: Run Start Time: 20 ms 
[24276]PERF: Run End Time:   20 ms 
[24276]PERF: Run Time:       0 ms 
[24276]PERF: DOMSTAT: MemUsage = 116088 Bytes  numNodes = 152  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 150  numReplace = 34  
[24276]PERF: input = ???
[24276]PERF: Time: 20 ms 
[24276]Request finished. Thu Aug  4 21:01:28 2005
. Entry-SVs: 17393  Exit-SVs: 22563 
[24276]PERF: DOMSTAT: MemUsage = 97168 Bytes  numNodes = 92  numLevelLookup = 0 
 numLevelLookupItem = 0  numStr = 140  numReplace = 34  
[24276]REQ: ***** Start Request at Thu Aug  4 21:01:28 2005
[24276]Use App: gusweb
[24276]Embperl::Object Request Filename: /home/gus/public_html/gus/defoma.html
[24276]Embperl::Object basename: _base.epl
[24276]Embperl::Object Check for base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object Found Base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object path: /home/gus/public_html/gus
[24276]Embperl::Object import new Application: _app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]SYNTAX: switch to Embperl::Syntax::Text
[24276]Embperl::Object import new Application finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__4
[24276]ERR:  24:  Error in Perl code: Can't locate object method "init" via 
package "Embperl::__4" at /usr/lib/perl5/Embperl/Object.pm line 314, <$inv> 
line 5.

[24276]Open /home/gus/public_html/gus/../gus.out//defoma.html for output...
[24276]PERF: input = ???
[24276]PERF: Time: 0 ms 
[24276]Request finished. Thu Aug  4 21:01:28 2005
. Entry-SVs: 22515  Exit-SVs: 22822 
[24276]PERF: DOMSTAT: MemUsage = 122888 Bytes  numNodes = 97  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 140  numReplace = 34  
[24276]REQ: ***** Start Request at Thu Aug  4 21:01:28 2005
[24276]Use App: gusweb
[24276]Embperl::Object Request Filename: /home/gus/public_html/gus/index.html
[24276]Embperl::Object basename: _base.epl
[24276]Embperl::Object Check for base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object Found Base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object path: /home/gus/public_html/gus
[24276]Embperl::Object import new Application: _app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]ERR:  32:  Warning in Perl code: Subroutine init redefined at 
/home/gus/public_html/gus/_app.pl line 12, <$inv> line 8.
[24276]ERR:  32:  Warning in Perl code: Subroutine get_recipe redefined at 
/home/gus/public_html/gus/_app.pl line 23, <$inv> line 8.
[24276]Embperl::Object import new Application finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__2
[24276]Embperl::Object import new file: /home/gus/public_html/gus/index.html
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]SYNTAX: switch to Embperl::Syntax::Embperl
[24276]Reading /home/gus/public_html/gus/index.html as input using PerlIO (2050 
Bytes)...
[24276]PERF: Parse Start Time:      0 ms 
[24276]PERF: Parse End Time:                0 ms 
[24276]PERF: Parse Time:                    0 ms 
[24276]PERF: DOMSTAT: MemUsage = 125048 Bytes  numNodes = 122  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 160  numReplace = 34  
[24276]PERF: Compile Start Time:            0 ms 
[24276]PERF: Compile End Time:      0 ms 
[24276]PERF: After Compile Exec End Time: 0 ms 
[24276]PERF: Perl Compile End Time:         0 ms 
[24276]PERF: Compile Time:                  0 ms 
[24276]PERF: DOMSTAT: MemUsage = 126088 Bytes  numNodes = 121  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 160  numReplace = 35  
[24276]Embperl::Object import file finished: 
/home/gus/public_html/gus/index.html, package = Embperl::__5
[24276]Open /home/gus/public_html/gus/../gus.out//index.html for output...
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]Search for /home/gus/public_html/gus/index.html
[24276]Search: nothing to search return /home/gus/public_html/gus/index.html
[24276]PERF: Run Start Time: 0 ms 
[24276]PERF: Run End Time:   0 ms 
[24276]PERF: Run Time:       0 ms 
[24276]PERF: DOMSTAT: MemUsage = 131468 Bytes  numNodes = 136  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 162  numReplace = 39  
[24276]PERF: input = ???
[24276]PERF: Time: 0 ms 
[24276]Request finished. Thu Aug  4 21:01:28 2005
. Entry-SVs: 22794  Exit-SVs: 23093 
[24276]PERF: DOMSTAT: MemUsage = 126136 Bytes  numNodes = 121  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 160  numReplace = 39  
[24276]REQ: ***** Start Request at Thu Aug  4 21:01:28 2005
[24276]Use App: gusweb
[24276]Embperl::Object Request Filename: /home/gus/public_html/gus/software.html
[24276]Embperl::Object basename: _base.epl
[24276]Embperl::Object Check for base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object Found Base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object path: /home/gus/public_html/gus
[24276]Embperl::Object import new Application: _app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]Embperl::Object import new Application finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__4
[24276]ERR:  24:  Error in Perl code: Can't locate object method "init" via 
package "Embperl::__4" at /usr/lib/perl5/Embperl/Object.pm line 314, <$inv> 
line 32.

[24276]Open /home/gus/public_html/gus/../gus.out//software.html for output...
[24276]PERF: input = ???
[24276]PERF: Time: 0 ms 
[24276]Request finished. Thu Aug  4 21:01:28 2005
. Entry-SVs: 23075  Exit-SVs: 23105 
[24276]PERF: DOMSTAT: MemUsage = 126136 Bytes  numNodes = 121  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 160  numReplace = 39  
[24276]REQ: ***** Start Request at Thu Aug  4 21:01:28 2005
[24276]Use App: gusweb
[24276]Embperl::Object Request Filename: /home/gus/public_html/gus/talks.html
[24276]Embperl::Object basename: _base.epl
[24276]Embperl::Object Check for base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object Found Base: /home/gus/public_html/gus/_base.epl
[24276]Embperl::Object path: /home/gus/public_html/gus
[24276]Embperl::Object import new Application: _app.pl
[24276]Search for _app.pl
[24276]Search: #0 test dir=/home/gus/public_html/gus, 
fn=/home/gus/public_html/gus/_app.pl (skip=0)
[24276]Search: found /home/gus/public_html/gus/_app.pl
[24276]ERR:  32:  Warning in Perl code: Subroutine init redefined at 
/home/gus/public_html/gus/_app.pl line 12, <$inv> line 34.
[24276]ERR:  32:  Warning in Perl code: Subroutine get_recipe redefined at 
/home/gus/public_html/gus/_app.pl line 23, <$inv> line 34.
[24276]Embperl::Object import new Application finished: 
/home/gus/public_html/gus/_base.epl, package = Embperl::__2
[24276]Embperl::Object import new file: /home/gus/public_html/gus/talks.html
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]SYNTAX: switch to Embperl::Syntax::Embperl
[24276]Reading /home/gus/public_html/gus/talks.html as input using PerlIO (3531 
Bytes)...
[24276]PERF: Parse Start Time:      0 ms 
[24276]PERF: Parse End Time:                0 ms 
[24276]PERF: Parse Time:                    0 ms 
[24276]PERF: DOMSTAT: MemUsage = 128296 Bytes  numNodes = 151  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 184  numReplace = 39  
[24276]PERF: Compile Start Time:            0 ms 
[24276]PERF: Compile End Time:      0 ms 
[24276]PERF: After Compile Exec End Time: 0 ms 
[24276]PERF: Perl Compile End Time:         0 ms 
[24276]PERF: Compile Time:                  0 ms 
[24276]PERF: DOMSTAT: MemUsage = 129336 Bytes  numNodes = 148  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 184  numReplace = 40  
[24276]Embperl::Object import file finished: 
/home/gus/public_html/gus/talks.html, package = Embperl::__6
[24276]Open /home/gus/public_html/gus/../gus.out//talks.html for output...
[24276]Search for /home/gus/public_html/gus/_base.epl
[24276]Search: nothing to search return /home/gus/public_html/gus/_base.epl
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]Search for /home/gus/public_html/gus/talks.html
[24276]Search: nothing to search return /home/gus/public_html/gus/talks.html
[24276]PERF: Run Start Time: 0 ms 
[24276]PERF: Run End Time:   0 ms 
[24276]PERF: Run Time:       0 ms 
[24276]PERF: DOMSTAT: MemUsage = 134764 Bytes  numNodes = 162  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 186  numReplace = 44  
[24276]PERF: input = ???
[24276]PERF: Time: 0 ms 
[24276]Request finished. Thu Aug  4 21:01:28 2005
. Entry-SVs: 23078  Exit-SVs: 23371 
[24276]PERF: DOMSTAT: MemUsage = 129384 Bytes  numNodes = 148  numLevelLookup = 
0  numLevelLookupItem = 0  numStr = 184  numReplace = 44  

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

Reply via email to