http://knobbits.org/embperlobject-inheritance-bug.tar.gz
load up /test/dir1/sub/foo.html
(or http://knobbits.org/test/dir1/sub/foo.html if you like)
Some sort of memory corruption or something I guess. It happens all the time, at least.
This happens in both 1.3.6 (debian testing) and 1.3.3 (debian stable).
Can some please fix this for me? thanks :)
I think your approach in using EmbperlObject is not correct.
If you have components that need to be "casacaded" trough a directory tree its better to isolate them out of the "template" page.
The template should have all the needed "Executes" to these components and don't forget the magical Execute('*') to include the requested page. But don't reference back the parent's template the way you are doing.
Example:
/
|
| base.epr
| index.epo
| component1.epr
| component2.epr
| SUB_FOLDER /
|
| component1.epr
| component2.epr
| index.epo
| OTHER_FOLDER /
|
| component1.epr
| index.epoin base.epr:
[-
Execute('component1.epr');
Execute('component2.epr');
$req = shift;# code
-]
<html>
...
[- Exeute('*'); -]
...
</html>in component1.epr (The root level one): [- $req = shift;
# code
$req->{var1} = $object;
$req->{var2} = \%reference;
-]component2.epr contains other pieces of code to be reused.
in the other levels (folders), the components may safely reference the parent's one:
in component1.epr (in SUB_FOLDER):
[-
Execute('../component1.epr');
$req = shift;# code that add or change variables from parent's component1.epr
$object = $req->{var1};
$reference = $req->{var2};
$object->do_something();
$reference->{value}++;
-]Hope this helps.
-- Luiz Fernando B. Ribeiro Engenho Solu��es para a Internet
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
