Re: Loading a file from a different directory tree usin execute

2002-12-30 Thread Luiz Fernando B. Ribeiro
Em 29 Dec 2002 09:54:28 -0600
Carlos Kassab <[EMAIL PROTECTED]> escreveu:

> Hi:
> 
> 
> Do you know how to load a file with execute from a different directory
> tree?
> 
> i have a folder modules/Recommend/recommend.epl
> 
> and other folder includes/subs.epl
> 
> folders subs and modules are at the same level.
> 
> 
> if i try to load subs.epl from recommend.epl
> 
> I get the message :
> 
> 
> [2507]ERR: 30: recommend.epl(20): Not found includes/subs.epl
> 
> Do you know how can i load the file subs.epl without copy it 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 path1;path2;path3

Regards,

Luiz Fernando B. Ribeiro
Engenho Soluções para a Internet



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




use and do

2002-12-30 Thread Maurício Amorim
Hi list,
 
If i use 'do' in [! !], always have overhead, or i can use 'use' for get performance ?
 
 
thank you.
 
Mauricio

relative path is not working to load files

2002-12-30 Thread Carlos

Thanks to reply my email about Loading a file from a different directory tree using 
execute.

I am not using EmbperlObject.
>Hi,
>
>You can pass relative paths to Execute, >like '../some/other/page.epl'

I have tried using relative path but still does not work.

My problem is: 
> Do you know how to load a file with execute from a different directory tree?
> 
> i have a 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
> 
> I get the message :
> [2507]ERR: 30: recommend.epl(20): Not found includes/subs.epl
> 
> Do you know how can i load the file subs.epl without copy it to
> modules/Recommend?

Somebody knows other way to load the file?

Thank you in advance for you help

Carlos Kassab

___
No banners. No pop-ups. No kidding.
Introducing My Way - http://www.myway.com

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




pathname of current executing file relative to document root

2002-12-30 Thread Kee Hinckley
Is there a clean way to get this in HTML::EmbperlObject, or should I just take

$0->ReqFilename() and remove $ENV{DOCUMENT_ROOT}?

In case you're wondering.  I'm pulling text out of a database 
depending on the current file, but there are times where the file is 
Executed rather than directly invoked, so I can't use SCRIPT_NAME.
--

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

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



variable containing   is output literally as  

2002-12-30 Thread Jason Bodnar
I have the following code in my empberl document:

[- $rw->{$field} =~ s/\s+/ /g -]

[+ $rw->{$field} +]

And when displayed in the browser I see:

 2002-07-30 18:24:02

How can I make   be a non-breaking space? Is there an option I need to
turn on or off? I'm using 1.3.4.

Thanks.

--
Jason Bodnar
[EMAIL PROTECTED]
http://www.shakabuku.org


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




Re: variable containing   is output literally as  

2002-12-30 Thread Gavin Carr
On Mon, Dec 30, 2002 at 04:03:31PM -0600, Jason Bodnar wrote:
> I have the following code in my empberl document:
> 
> [- $rw->{$field} =~ s/\s+/ /g -]
> 
> [+ $rw->{$field} +]

Try:

[+ local $escmode = 0;  $rw->{$field} +]

Cheers,
Gavin

-- 
Open Fusion P/L - Open Source Business Solutions [ Linux - Perl - Apache ]
http://www.openfusion.com.au
- Fashion is a variable, but style is a constant - Programming Perl

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




Posting data when redirecting to a page

2002-12-30 Thread Hoenie Luk
Hi all,

I have a beginner's question.

I'm trying to redirect the program flow to another .htm page using 
$http_headers_out{Location} but I also want to pass a message ($msg) to the 
new page using POST method.

[-
$msg = "Error saving data #53: really really long explanation";
$http_headers_out{Location}="acc_admin.htm";
exit;
-]

What's the best way to do that?

Thanks very much.

...Hoenie Luk


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



Re: pathname of current executing file relative to document root

2002-12-30 Thread Kee Hinckley
At 4:09 PM -0500 12/30/02, Kee Hinckley wrote:

Is there a clean way to get this in HTML::EmbperlObject, or should I just take

$0->ReqFilename() and remove $ENV{DOCUMENT_ROOT}?


Actually, I take it back.  ReqFilename doesn't have the right name 
either.  How do I get the name of the file currently being executed.
--

Kee Hinckley - Somewhere.Com, LLC
http://consulting.somewhere.com/

I'm not sure which upsets me more: that people are so unwilling to accept
responsibility for their own actions, or that they are so eager to regulate
everyone else's.

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



Re: pathname of current executing file relative to document root

2002-12-30 Thread Carlos Kassab
Hi, maybe this resolve your problem.


[+ $ENV{'PATH_TRANSLATED'}+]

This env variable have the value you are looking for.

Well it resolve the problem i have to execute subs from different
directory trees.


[-

@keys = keys %ENV;
@values = values %ENV;

-]

[$ while (@keys) $]

[+pop(@keys)+]= [+pop(@values)+]

[$ endwhile $]


[-
$the_page_path=substr($ENV{'PATH_TRANSLATED'},0,length($ENV{'PATH_TRANSLATED'})-6); -]

File being called: [+ $ENV{'PATH_TRANSLATED'}+]
Page path: [+ the_page_path +]


Carlos Kassab

El lun, 30-12-2002 a las 19:12, Kee Hinckley escribió:
> At 4:09 PM -0500 12/30/02, Kee Hinckley wrote:
> >Is there a clean way to get this in HTML::EmbperlObject, or should I just take
> >
> >$0->ReqFilename() and remove $ENV{DOCUMENT_ROOT}?
> 
> Actually, I take it back.  ReqFilename doesn't have the right name 
> either.  How do I get the name of the file currently being executed.
> -- 
> 
> Kee Hinckley - Somewhere.Com, LLC
> http://consulting.somewhere.com/
> 
> I'm not sure which upsets me more: that people are so unwilling to accept
> responsibility for their own actions, or that they are so eager to regulate
> everyone else's.
> 
> -
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
-- 
Consultoría ERP BaaN Tools
Aplicaciones Internet/Intranet
http://www.glin.com.mx



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