Hello all,
It's been a long time out of Embperl...
I'm using Execute inside of EmperlObject pages to produce non-html data
and the newline produced after each execute is causing seriuos problems.
Is there any way or option to remove this newline?
I tried to use seek OUT, 0, 0 but it seems th
ables and
traceback information to a debug file. Send debug information to screen
may not always be possible and using a debug file allow you to debug a
production system without bothering your users.
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 6959-7610
On Thu, Mar 17, 200
his syntax works for 1.3.x I don't know what should be changed for
Embperl 2
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 6959-7610
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
lly print sometext in bold, however,
no matter the escape mode, I seem to get the tags stripped out. How can
I preserve the tags? I had it working in one instance, but I'm doing
something like
$str = "<"; $str .= "b>"; .. etc for it to work.
thanks,
Daniel
Inside [- -] ta
k if you use the following instead?
[- $fdat{'number'} = '0'); -]
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
to mess with session id and other auth tokens when I use htmldoc. So it
will have to output the result sent to the browser also to the filesystem.
(Tee'd.)
The above recipe also shows how to do this.
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
-
your example, you have to use print OUT "anything";. OUT is an
especial Filehandle connected to the output stream.
Good luck,
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
Keven Murphy wrote:
I cannot figure out why the below html source page is hosed up.
complicated but, as suggested before, we
can discuss this and other people solutions a bit more if anybody wants.
---
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ce across
pages to be able to share variables. The same applies to CLEANUP. Embperl
handles the namespace and encapsulates each page to avoid leaks and
collisions.
I recommend you to read about EmbperlObject since it has many features to
improve your application design.
--
Luiz Fernando B. Ribeiro
En
bject->function()
For loading your pages I suggest you to put the list of pages to be
imported in a shared function but to execute the Execute statement inside
each page, like:
Execute({isa => $_}) foreach modules();
where modules return a list of your epl pages to be loaded.
I encourage yo
finish it I will publish it. Anyone wishing to try it out
mail me.
--
Luiz Fernando B. Ribeiro
Engenho SoluÃÃes para a Internet
+55 11 4485-0136
Ben Kim
On Fri, 28 May 2004, Luiz Fernando B. Ribeiro wrote:
On Thu, 27 May 2004 16:04:48 -0500 (CDT), Ben Kim <[EMAIL PROTECTED]>
wrote:
&g
mplicated to install and requires the patching of
several Dreamweaver files. If you are interested, or anyone else, mail me
and I will send the files and the instructions.
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
--
]
[$ else $]
Sorry, could not deliver your message
[$ endif $]
[$ else $]
Name:
Age:
[$ endif $]
...
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
-Original Message-
From: Luiz Fernando B. Ribeiro [mailt
r open a pipe to sendmail or mail.
From CPAN the easiest modules are Mail::Sendmail (for simple messages)
and MIME:Lite (for more options, like attachments).
Embperl has a bult-in feature for doing this but I am not familiar with
it, try reading the manual pages for this.
Good luck,
--
Luiz Fern
gt;{var1} = 'ok';
$req->{my_object} = new Object;
-]
in other pages in the same request:
[-
$req = shift;
do_something() if $req->{var1};
$req->{my_object}->method();
-]
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
+55 11 4485-0136
?
In fact you can use any extension you want, even .html or .asp...
I use the following extensions:
.epo: EmbperlObject pages
.epl: Plain Embperl pages
.epr: Resource files executed inside other pages, shared pieces of
code.
--
Luiz Fernando B. Ribeiro
Engenho Soluções p
otes('EMBPERL_ERRORS');
if ($errors && @$errors) {
Execute('notify_error.epr', $errors);
}
}
-]
This setup works for me under Embperl 1.3, I don't know how different
it is under Embperl 2.x
Hope this helps,
--
Luiz Fernando B. Ribeiro
Engenho
ication to keep data on the
server side using %udat, as suggested.
Sorry for the mistake,
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
gical [$ hidden $]
feature of Embperl to populate your form.
3. In your link put href="document.myForm.submit()".
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED
th this implementation I think things are well isolated, and as Ed
noted also, the logic is available to command line tools.
Maybe other people have other suggestions on this matter.
OB> I know this too but thanx for your information and feedback.
OB> I appreciate :-) Any additional q
go someone posted the results of a performance
comparison between Embperl, PHP, Mason and others (maybe someone can
post it again).
Gerald have already said that Embperl 2 is ready for production
systems.
Regards,
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Tuesday, March 23, 200
ndler HTML::EmbperlObject
Options ExecCGI
and optionally use
PerlSetEnv EMBPERL_OBJECT_ADDPATH "/my_components_folder"
to use common repository for your site.
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
) {
$errors = $prev->pnotes('EMBPERL_ERRORS');
if ($errors && @$errors) {
unshift @$errors, 'Capturado via pnotes!';
Execute('Erro_notificar.epr', $erros);
}
}
-]
With this technique you can dump %ENV, %fdat and %udat in
er of reordering the
loading of the modules and/or using blocks in httpd.conf. By now
I'm prefering to compile modperl with apache and load the "rest" as a DSO.
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
e::Session settings?
Store an initial "time" in %udat and on each request compare if the
actual time - initial time > maximum time and them timeout or not the
session.
Hope its clear enough.
--
Luiz Fernando B. Ribeiro
Engenho S
files with the "isa" syntax in the "base template" file you
can call your subs as methods of the $req object.
This is just one of the alternatives.
Other solution is to pass the $req to every sub you call in the file
imported.
--
Luiz Fernando B. Ribeiro
Engenho Soluções para
2 3 4 5 6 7 8 9 10/;
$maxcol = 4;
-]
[+ $array[$cnt] +]
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
bigger than the capacity of the column in your database (usually 32k).
Good luck,
--
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
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]
t;optDisableHtmlScan" (consult the manual).
Anyway this can be tricky since the POSTED data has no information about
forms namespace and the values will get overlapped.
This kind of complex layout require javascript to work properly.
Regards,
--
Luiz Fernando B. Ribeiro
Engenho
existence.
I don't want to hardcode a path such as your example.
Thanks,
Cameron
> -Original Message-
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]
> Sent: Friday, September 26, 2003 7:58 PM
> To: Cameron B. Prince
> Cc: [EMAIL PROTECTED]
> Subject:
Hi,
Does anyone have an example of a way to do a file existence test before
executing a file to include? It's not clear to me what the current working
directory is.
Thanks,
Cameron
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
Hi all,
I have an Embperl page that uses a custom module which has code that calls
an external perl script via fork. This script takes a considerable amount of
time to run and I need it to just run in the background. I've gotten it to
work but I'm noticing that I've got zombies once the processes
Hi Justin,
You may know this already, if so, sorry... I'm using packages with my
Embperl project too...
To troubleshoot them, you can actually use Vim to run perl against them.
Open your package in vi or vim (vi is an alias for Vim on RH when it's
installed) and do the following:
Shift g (move
> All the files are uniquely titled. i.e, there is only one code.pm, one
> rules.pm, etc. Many other embperl pages "use" rules.pm, but
> they are all the
> same files.
I have noticed this behavior on occasion. I tracked it down to a problem
with my code in a specific block. I only got the error w
Hi Sean,
>
> My first instinct on this would be to a javascript onClick()
> event on the button, which triggers a function that changes the form's
> action attribute based on which button they clicked, then submit the
> form. The function would look something like:
>
> function subform(dest
Hi,
I have a page that has a form with multiple submit buttons. Two of the
buttons should and do only cause the page to refresh. The third button
however, needs to cause the browser to load a different page.
I'm doing somthing like this on another page with:
$http_headers_out{'Location'} =
"h
I am not exactly sure of the order of execution, but I know it doesn't work
like that... If you need interpolation on the form, you will have to do it
inside the same block that creates it.
As far as I know, there is no option to cause a page or block to be
reparsed.
Good luck,
Cameron
> -Or
I think it will do what you want if you remove the value="..." token from
the input:
If you need a default value, set it by placing a value in fdat above the
input:
[- $fdat{info} = 'testing'; -]
Cameron
> -Original Message-
> From: Harald Becker [mailto:[EMAIL PROTECTED]
> Sent: Thur
t to a non-existent hash.
Is there another way to do this?
Is there a way to include a file in a page without executing it, so that
it's parsed as if it's part of the same page?
Thanks,
Cameron
> -Original Message-
> From: Cameron B. Prince [mailto:[EMAIL PROTECTED]
>
Hi,
In one of my pages I have a block at the top that calls a custom package
I've created. This package returns a reference to a hash of hashes. This
page has two output blocks. Each loops over one of the embedded hashes. This
is working fine.
Now, I need to create another page that will only use
Hi,
I am trying to use Embperl to scan a directory of files... I call a package
that uses Cwd and File::Find. It returns the list of files. However, when I
run it from the Embperl code I get:
[error] [2306]ERR: 24: Error in Perl code: chdir: Illegal seek
I have read the documentation on Safe
Hi,
I'm trying to increase the performance of my Embperl site... Below are the
relevant lines from my httpd.conf file. I have debug set to 0 and log set to
/dev/null before embperl is loaded, but for some reason, I still get data in
/tmp/embperl.log.
I am running RH9 with Embperl-2.0b9. Can you t
which element we want.
So really the only thing we need to tell perl is that $zweeb not zweeb
is the reference to use. The -> does that. This means ${$zweeb}[0] and
$zweeb->[0] are the same thing. And so is ${$a}{'joe'} and $a->{'joe'}
or &{$fctn}() and $fctn-&g
Try to use the Embperl idioms:
[$ foreach $var @list $]
...
[$ endforeach $]
you can use [$ if test $] around your foreach to have conditional loops
also. I suggest you take a look at the man page of Embperl and
EmbperlObject to get familiar with the syntax if are new to Embperl.
Regards,
Luiz
Hi,
Put a ref to the %fdat hash in the link, example:
[-
$args = \%fdat;
-]
http://esorclupg/embperl/dba_database.epl?[+ $args +]">link
Embperl will build all the key=value pairs for you.
I don't know why but inserting directly the \%fdat ref in the link never
worked for me but the above exampl
7;t have any variable inside the value use single quotes and it should
work:
$req->{msg} = 'some text \ some more text';
And don't forget the [+ local $escmode=0; ... +] in the output block.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
You have to backup your original files outside the original folders
since DW scans them for xml files.
I think that should solve your issues.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Em Tue, 21 Jan 2003 14:34:57 -0500
"Noel King" <[EMAIL PROTECTED]>
This erros occurs if the MMDocumentType.xml contains duplicated entries
in the extensions attribute over different server models.
Send me a copy of your file.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Em Tue, 21 Jan 2003 14:34:57 -0500
"Noel King" <[EM
Hi Maurício,
What is not working for you?
Até mais,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Em Mon, 20 Jan 2003 20:56:53 +
"Maurício Amorim " <[EMAIL PROTECTED]> escreveu:
> Hi list,
>
> I have the following problem:
>
> I am using d
Hi Noel,
It seems that some of the files were not updated. Open your
Extensions.txt and MMDocumentType.xml and check if the .epl extension
is there.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Em Thu, 16 Jan 2003 21:44:57 -0500
"Noel King" <[EMAIL PROTECT
.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
Em Thu, 16 Jan 2003 01:02:03 -0500
Saadiq Rodgers-King <[EMAIL PROTECTED]> escreveu:
> I'm aware of this extension (http://www.somewhere.com/software/) for
> Dreamweaver 3, but has anyone had any success making
rate.
>
> Exist any form for do it.
> I am trying an explorer in html. (simple)
>
This is very tricky but possible. For reentrant code use plain perl subs
instead of Embperl [$ sub $] and output html with print OUT.
Regards,
Luiz Fern
nstance variable of your object to read from
it later.
> {
> print FILE $buffer;
> $totallength += $bytes;
> }
> close FILE;
> close $self->{file};
> }
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
---
without problems, can you post your form
and describe better (with code) the way you are handling %fdat to
retrieve the file?
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
rection with http headers the best way is to store the
message in the session (%udat) and retrieve the message later.
Maibe you can redirect the output using an [$ if ... $] statement
followed by an Execute to the other page, this way you can pass the $msg
variable easily
folder modules/Recommend/recommend.epl
> >
> > and other folder includes/subs.epl
> >
> > folders subs and modules are at the same level.
> >
> >
> > if i try to Execute ('../subs.epl') from recommend.epl
Here is the mistake, you
to
> modules/Recommend?
Hi,
You can pass relative paths to Execute, like '../some/other/page.epl'.
If you are using EmbperlObject you can use the following directive in
your httpd.conf to add the directories you want to be searched:
PerlSetEnv EMBPERL_OBJECT_ADDPATH path
correctly. Read the documentation about the
Exporter:
> perldoc Exporter
Any way I sugest you to use [! !] instead of [- -] for loading modules
because it is executed only once.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
e server 1.3.26
Hi,
In this case you should use a require or do statement.
Or if you are using mod_perl you can Execute the file and append
the variables to the $req object that is passed in @_ to all pages
executed. If you don't know how to do this I can post some examples.
Regards,
Lu
" in another scope, they are not
available there unless you set the package your pages will run.
In my modules whenever I need %udat or %fdat I pass them by reference,
like:
do_something(\%udat, \%fdat);
I think that will solve your problem.
Regards,
Luiz Fernando B. Ribeiro
Engenho
that
directory, your browser you not provide that cookie and you will receive
another one.
Correct it with the EMBPERL_COOKIE_PATH option in your httpd.conf.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
---
I use a [$ sub error $] in my base.epl that do do all the error handling
and in the end it exits with a normal exit;
In my other pages after any eval {}; or other error I call that sub with
$req->error('tittle', 'page', $error);
It works fine with Embperl 1.3.4.
Regards,
Lui
ot;. Your setup should be in your
httpd.conf and in your html files just use the %udat hash provided
by Embperl.
Read the man pages:
perldoc HTML::Emperl
perldoc HTML::EmperlObject
perldoc Apache::Session::Store::MySQL
The 'session_id' is accessed with [+ $udat{_session_id} +]
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
uff from the mod_perl docs:
>
Hi,
Write your burning code in a script, call it with system and
then fork on the script. When the script returns after the fork your
apache proccess will go on without locking and you can take the time you
need as you expect.
This works form me without any proble
e a look at the
man page >perldoc HTML::Embperl. You will discover that Embperl is a
rich enviroment and you will be alot more productive.
To access the form fields in a Embperl page use the %fdat hash:
$fdat{Name} # CGI =
very
> request. So I imagine that there already exists a way to keep database
> connections open between calls.
Install Apache::DBI and loads it in your httpd.conf before any call to DBI.
PerlModule Apache::DBI
Regards,
Luiz Fernando B.
erl/pod/doc/Embperl.-page-14-.htm
The link for the mmm.el file for Emacs is broken, I made a search on
Google and found the following new URL:
http://mmm-mode.sourceforge.net/
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
--
this way:
\ \Text\
This have always worked for me.
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
erful solution but requires full access to the
the server to be installed.
In case you can't find any suitable module for your needs in CPAN I
have a simple module for CGI session management that I can send you.
Maybe you should explain your needs better...
Good luck,
Luiz Fernando B. Ribeir
e and in fact should just provide
the namespace and load the necessary modules, adding just the new
methods needed for a particular project.
You should avoid using globals in your shared code, put everything
on the object itself. This way you can safely share your code between
different sites.
subsequent calls return the
[- Execute('*'); -]# same dbh
html stuff
# The object itself, on using, start
# to cache useful things
Regards,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
[EMAIL PROTECTED]
Kee> I have some initi
Sorry if this seems confuse...
Thanks and best wishes,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
right.
The @param array should not be cleaned automatically after the
end of the request?
Thanks for assistance and best wishes to all,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
[EMAIL PROTECTED]
-
To unsubscri
Hi all,
I have solved the problem using a module called Exception.pm, it
provides a very good interface for exception handling and I was able
to bypass the die bug not being trapped by the eval block.
Best wishes,
Luiz Fernando B. Ribeiro
use Exception qw(:all);
...
$fifo = "$
r in Perl code: Died at ...
Any clues or wokarounds?
Thanks in advance.
Luiz Fernando B. Ribeiro
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
r things I do with Embperl seem to work.
BO> Anybody know what gives?
Try setting local $escmode = 0; inside the [- -] that your code is
in...
Embperl has some trouble to differentiate from
.
Best wishes,
Luiz Fernando B. R
mmand instead of print, but the
sintax is different, take a look at the the perlfunc doc:
$ perldoc perlfunc
but this will work for you:
printf MAIL "You got R\$ %.2f",$valor;
CPA> -----Original Message-
CPA> From: Luiz Fernando B. Ribeiro [mailto:[EMAIL PROTECTED]]
CPA>
l places). It passes as a whole number with no decimal. How can I
CPA> format this?
CPA> -
CPA> To unsubscribe, e-mail: [EMAIL PROTECTED]
CPA> For additional commands, e-mail: [EMAIL PROTECTED]
Sem mais,
Luiz Ferna
ally.
I compiled Embperl on my machine but when I upload and run a test it
complains:
error while loading shared libraries ...
undefined symbol: Perl_get_hv
Thanks,
Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet
[EMAIL
r. Edit the embpcgi.pl and add the place you
uploaded the files to @INC
BEGIN { unshift @INC, '/home/luiz/perl_libs'}
or under Perl 5.6:
use libs '/home/luiz/perl_libs';
Make a test .epl file and fire it!
Good luck,
Luiz Fernando B. Ribeiro
At
er of mod_perl.
Sem mais,
Luiz Fernando B. Ribeiro
At Home - Design e Internet
[EMAIL PROTECTED]
[EMAIL PROTECTED]
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
ed to execute constants in both bases. Execute('../constants.epl') doesn`t
LZ> work. How can I do it?
Try this:
[!
use Carp;
!]
[-
$req = shift;
$req->{appname} = "test app";
-]
If you put the $req stuff into [!!] block it will be executed
r HTML::Embperl
LZ> Options ExecCGI
LZ>
It seems to me you forgot to call HTML::EmbperlObject in PerlHandler
above instead of HTML::Embperl.
bye,
Luiz Fernando B. Ribeiro
At Home - Design e Internet
[EMAIL PROTEC
ments).
When you say $param[3] you are putting in @records just the 4th
element of @param, try this:
($bgcolor1, $bgcolor2, $textcolor, @records) = @param;
This should work as you expect.
Bye,
Luiz Fernando B. Ribeiro
At
e too, but with no luck.
Thanks,
Luiz Fernando B. Ribeiro
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
$obj = new MyModule;
$req->{obj} = $obj; # This way you can retrieve the object in any
# file you Execute
-]
...
[- Execute ('*') -]
...
In other files:
[-
$req = shift;
$obj = $req->{obj};
-]
[+ $obj->test +]
Good luck,
Luiz Fern
cases I use fully qualified names like:
@PACK::THISPACKAGE::ISA = qw/some_pm/;
Can anyone help me with this?
Thanks,
Luiz Fernando B. Ribeiro
-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
Hi
I have a problem which I am sure there is an easy
solution to but I just can't find it.
I use DBI and when I write to MySQL a string
containing ' (for example the word can't) I get this
error.
[6631]ERR: 32: Line 157: Warning in Perl code:
DBD::mysql::st execute failed: You have an error in
Hi,
I am working on a website which is using ePerl for embedding Perl code
in HTML. Due to various reasons I am contemplating migrating to EmbPerl
or Mason. The problem is that in ePerl all code are delimited by <%
%> but in EmbPerl I see [- / [+ / [* and other delimiters. I could
obviously
90 matches
Mail list logo