On 03/20/2015 12:31 PM, Massimo Manghi wrote:
On 03/20/2015 12:45 AM, Alexey Noskov wrote:
Hello,
I get an error when try to parse .rvt files from tclsh or wish (outside
of apache):
% package require tclrivet
0.1
% parse "/home/local/htdocs/index.rvt"
wrong # args: should be "parse"
Is there any possibility to fix it? Thank you for your answers
Alexey
Alexey,
you're trying to access the Tcl parser package, which is currently
unmaintained
If you installed rivet you should have librivetparser.so somewhere.
Check the configure output to see where the libraries are installed,
you should find a line like
.....
checking for Rivet tcl library target... /usr/local/lib/rivet2.2
.....
you can change this directory using --with-rivet-target-dir=[DIR]
If you're using a custom installation most likely you have to add to
the load_path also this directory in order to load the parser
% package require rivetparser
0.2
and then you can parse a template with
::rivet::parserivet filename
the command returns a Tcl script ready to be evaluated with 'eval'
unfortunately upon evaluation every mod_rivet core command in the
script will raise an error because they are not existing outside of
Apache and after all many of them make sense only within Apache. In
the Tcl implementation David started to work on a compatibility layer,
but much of it is unfinished, it's missing many commands we added
since then and all things considered I can hardly imagine how to give
a meaning to most of them outside an HTTP processing.
The concept is interesting nonetheless and if you have an idea on how
to create a test environment outside Apache you're welcome if you
shared your thoughts with us.
-- Massimo
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
Massimo , thank you for the explanation, now it is much more clear. I
will try to play with librivetparser.so.
Alexey
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]