This is probably a really dumb question. I just recently began using
Embperl and cannot find an easy way to do the following:
I would like ot embed Embperl commands e.g. [+ $blah +] inside text which
has been retrieved from a database via DBI or DBIx.
The only way I can seem to get the commands to be seen by Embperl is to
write the text to a file and then Execute it. This is because the Execute
command seems to demand a filename. This seems inefficient and slow, not to
mention inelegant.
I would like to just give the text string to Embperl somehow and have it
"eval" the string, processing it like other code with Embperl commands.
Ideally, it would not be necessary to have the text be executed in its own
scope, but rather in the same scope as the file it is included in. To
clarify: If I declare a variable $foo in a file, then get some text from a
database in that same file, I would like to be able to refer to $foo in
that retrieved text and have it be evaluated in that same context.
Apologies if this is a really stupid question...
FWIW I really like Embperl and am using it for some quite large projects.
It's the foundation for two or three websites which I am developing.
Thanks for any suggestions
-Neil Gunton
Embperl and cannot find an easy way to do the following:
I would like ot embed Embperl commands e.g. [+ $blah +] inside text which
has been retrieved from a database via DBI or DBIx.
The only way I can seem to get the commands to be seen by Embperl is to
write the text to a file and then Execute it. This is because the Execute
command seems to demand a filename. This seems inefficient and slow, not to
mention inelegant.
I would like to just give the text string to Embperl somehow and have it
"eval" the string, processing it like other code with Embperl commands.
Ideally, it would not be necessary to have the text be executed in its own
scope, but rather in the same scope as the file it is included in. To
clarify: If I declare a variable $foo in a file, then get some text from a
database in that same file, I would like to be able to refer to $foo in
that retrieved text and have it be evaluated in that same context.
Apologies if this is a really stupid question...
FWIW I really like Embperl and am using it for some quite large projects.
It's the foundation for two or three websites which I am developing.
Thanks for any suggestions
-Neil Gunton