Bruno Postle | 22 Jun 17:39
X-Face

Re: Variables within variables.

I was just fixing some (really stupid) mistakes in the Petal 
QUICKSTART pod documentation and found the answer to this question.

On Tue 17-May-2005 at 20:35 -0400, Josh Narins wrote:
>
> What I want, in perl, would look like this.
>
> $tal->{onething}->{ $tal->{otherthing} }
>
> I tried
>
> string:stuff${onething/${otherthing}}
>
> but it didn't work.
>
> Is this supported, or should I work around?

The Petal docs say this:

       You cannot write nested expressions such as:

          ${my_var/hello_world ${my_var/current_user}}

       This will NOT work. At least, not yet.

So I guess that means you can't :-P

--

-- 
Bruno

(Continue reading)

Bruno Postle | 23 Jun 12:47
X-Face

pod documentation fixes

On Thu 05-May-2005 at 16:46 -0400, William McKee wrote:
>
> Finally, there are a couple typos in the macros section of the POD. It
> looks like the use-macro and define-macro definitions got mixed up so
> that they wrong macro is being referenced. I can make that fix when I
> update the above.

Fixed in CVS.

On Sun 08-May-2005 at 21:29 -0400, Kurt Stephens wrote:

> To correctly define the petal and metal
> namespaces, use the following:
>
> <html xmlns="http://www.w3.org/1999/xhtml"
>     xmlns:petal="http://purl.org/petal/1.0/"
>     xmlns:metal="http://xml.zope.org/namespaces/metal">
>
> We should correct the section in the Petal cookbook and add this
> to the main documentation in Petal.pm.  I will post a patch
> against the current 2.16 code so that we can add this whenever
> the next version comes out.

Fixed in CVS too.

--

-- 
Bruno

Jing Wang | 24 Jun 22:16
Picon
Favicon

POST vs.GET

I was trying to use method=POST in my form since I have a very long 
parameter to pass. But I realized that POST does not work with petal. 
Has anybody had the same problem? Is there a solution in case I have to 
use POST?

Thanks,
jw

Simon McCaughey | 24 Jun 22:51
Favicon

Re: POST vs.GET

try post - as in lowercase,

HTH 

Simon

----- Original Message ----- 
From: "Jing Wang" <jwang@...>
To: <petal@...>
Sent: Friday, June 24, 2005 9:16 PM
Subject: [Petal] POST vs.GET

>I was trying to use method=POST in my form since I have a very long 
> parameter to pass. But I realized that POST does not work with petal. 
> Has anybody had the same problem? Is there a solution in case I have to 
> use POST?
> 
> Thanks,
> jw
> 
> 
>

Jing Wang | 24 Jun 22:59
Picon
Favicon

Re: POST vs.GET

I have tried both POST and post. Neither works.

Simon McCaughey wrote:

> try post - as in lowercase,
>
> HTH
> Simon
>
> ----- Original Message ----- From: "Jing Wang" <jwang@...>
> To: <petal@...>
> Sent: Friday, June 24, 2005 9:16 PM
> Subject: [Petal] POST vs.GET
>
>
>> I was trying to use method=POST in my form since I have a very long 
>> parameter to pass. But I realized that POST does not work with petal. 
>> Has anybody had the same problem? Is there a solution in case I have 
>> to use POST?
>>
>> Thanks,
>> jw
>>
>>
>>

Bruno Postle | 24 Jun 23:14
X-Face

Re: POST vs.GET

On Fri 24-Jun-2005 at 13:16 -0700, Jing Wang wrote:

> I was trying to use method=POST in my form since I have a very long 
> parameter to pass. But I realized that POST does not work with petal. 

Try it with double-quotes:

  <form method="post" ... >

--

-- 
Bruno

Jing Wang | 24 Jun 23:52
Picon
Favicon

Re: POST vs.GET

These are the things I have tried:
1. <form method="get" action="some_petal_page.pt">: works fine;
2. <form method="post" action="some_cgi_script.pl">: works fine;
3. <form method="post" action="some_petal_page.pt">: does not work. It 
looks like my browser does not recognize "some_petal_page.pt". It acts 
like I am downloading a file.
Just to clarify, I have a "request-broker" perl cgi that retrieves all 
the parameters passed from a petal page, and processes the resulting 
petal page.

Bruno Postle wrote:

>On Fri 24-Jun-2005 at 13:16 -0700, Jing Wang wrote:
>
>  
>
>>I was trying to use method=POST in my form since I have a very long 
>>parameter to pass. But I realized that POST does not work with petal. 
>>    
>>
>
>Try it with double-quotes:
>
>  <form method="post" ... >
>
>  
>

Mark Holland | 26 Jun 12:45

Re: POST vs.GET

Hi Jing,

Is this script running under mod_perl? If so, are trying to read in the 
POSTed data twice? POST data read can only be read once under mod_perl.

~mark

Jing Wang wrote:

> These are the things I have tried:
> 1. <form method="get" action="some_petal_page.pt">: works fine;
> 2. <form method="post" action="some_cgi_script.pl">: works fine;
> 3. <form method="post" action="some_petal_page.pt">: does not work. It 
> looks like my browser does not recognize "some_petal_page.pt". It acts 
> like I am downloading a file.
> Just to clarify, I have a "request-broker" perl cgi that retrieves all 
> the parameters passed from a petal page, and processes the resulting 
> petal page.
>
> Bruno Postle wrote:
>
>> On Fri 24-Jun-2005 at 13:16 -0700, Jing Wang wrote:
>>
>>  
>>
>>> I was trying to use method=POST in my form since I have a very long 
>>> parameter to pass. But I realized that POST does not work with 
>>> petal.   
>>
>>
(Continue reading)

Jing Wang | 27 Jun 20:28
Picon
Favicon

Re: POST vs.GET

Hi Mark,

Thanks for your reply. I think I know what the problem is. It is not 
petal but the apache mod_rewrite that does not handle the post request 
correctly. I will see if I can find a solution to that.

Regards,
Jing

Mark Holland wrote:

> Hi Jing,
>
> Is this script running under mod_perl? If so, are trying to read in 
> the POSTed data twice? POST data read can only be read once under 
> mod_perl.
>
> ~mark
>
> Jing Wang wrote:
>
>> These are the things I have tried:
>> 1. <form method="get" action="some_petal_page.pt">: works fine;
>> 2. <form method="post" action="some_cgi_script.pl">: works fine;
>> 3. <form method="post" action="some_petal_page.pt">: does not work. 
>> It looks like my browser does not recognize "some_petal_page.pt". It 
>> acts like I am downloading a file.
>> Just to clarify, I have a "request-broker" perl cgi that retrieves 
>> all the parameters passed from a petal page, and processes the 
>> resulting petal page.
(Continue reading)


Gmane