From bruno at mkdoc.com Wed Jun 22 16:39:06 2005 From: bruno at mkdoc.com (Bruno Postle) Date: Wed Jun 22 16:39:11 2005 Subject: [Petal] Variables within variables. In-Reply-To: <20050518003517.GA27623@narins.net> References: <20050518003517.GA27623@narins.net> Message-ID: <20050622153905.GB19073@webarchitects.co.uk> 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 From bruno at mkdoc.com Thu Jun 23 11:47:18 2005 From: bruno at mkdoc.com (Bruno Postle) Date: Thu Jun 23 11:47:23 2005 Subject: [Petal] pod documentation fixes In-Reply-To: <001101c55436$93a4deb0$0301a8c0@ishmael> <20050505204637.GK776@knowmad.com> References: <001101c55436$93a4deb0$0301a8c0@ishmael> <20050505204637.GK776@knowmad.com> Message-ID: <20050623104717.GC19073@webarchitects.co.uk> 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: > > 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 From jwang at bcgsc.ca Fri Jun 24 21:16:19 2005 From: jwang at bcgsc.ca (Jing Wang) Date: Fri Jun 24 21:16:29 2005 Subject: [Petal] POST vs.GET Message-ID: <42BC6A13.1080108@bcgsc.ca> 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 From simonmcc at nortel.com Fri Jun 24 21:51:38 2005 From: simonmcc at nortel.com (Simon McCaughey) Date: Fri Jun 24 21:52:02 2005 Subject: [Petal] POST vs.GET References: <42BC6A13.1080108@bcgsc.ca> Message-ID: <00ca01c578fe$84aa0b50$34c1a42f@atticpc> try post - as in lowercase, HTH Simon ----- Original Message ----- From: "Jing Wang" To: 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 > > > From jwang at bcgsc.ca Fri Jun 24 21:59:45 2005 From: jwang at bcgsc.ca (Jing Wang) Date: Fri Jun 24 21:59:50 2005 Subject: [Petal] POST vs.GET In-Reply-To: <00ca01c578fe$84aa0b50$34c1a42f@atticpc> References: <42BC6A13.1080108@bcgsc.ca> <00ca01c578fe$84aa0b50$34c1a42f@atticpc> Message-ID: <42BC7441.2020804@bcgsc.ca> I have tried both POST and post. Neither works. Simon McCaughey wrote: > try post - as in lowercase, > > HTH > Simon > > ----- Original Message ----- From: "Jing Wang" > To: > 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 >> >> >> From bruno at mkdoc.com Fri Jun 24 22:14:07 2005 From: bruno at mkdoc.com (Bruno Postle) Date: Fri Jun 24 22:14:13 2005 Subject: [Petal] POST vs.GET In-Reply-To: <42BC6A13.1080108@bcgsc.ca> References: <42BC6A13.1080108@bcgsc.ca> Message-ID: <20050624211407.GG3440@webarchitects.co.uk> 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:
-- Bruno From jwang at bcgsc.ca Fri Jun 24 22:52:03 2005 From: jwang at bcgsc.ca (Jing Wang) Date: Fri Jun 24 22:52:07 2005 Subject: [Petal] POST vs.GET In-Reply-To: <20050624211407.GG3440@webarchitects.co.uk> References: <42BC6A13.1080108@bcgsc.ca> <20050624211407.GG3440@webarchitects.co.uk> Message-ID: <42BC8083.9080705@bcgsc.ca> These are the things I have tried: 1. : works fine; 2. : works fine; 3. : 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: > > > > > From mark at thinkfoo.com Sun Jun 26 11:45:40 2005 From: mark at thinkfoo.com (Mark Holland) Date: Sun Jun 26 11:34:10 2005 Subject: [Petal] POST vs.GET In-Reply-To: <42BC8083.9080705@bcgsc.ca> References: <42BC6A13.1080108@bcgsc.ca> <20050624211407.GG3440@webarchitects.co.uk> <42BC8083.9080705@bcgsc.ca> Message-ID: <42BE8754.9050103@thinkfoo.com> 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. : works fine; > 2. : works fine; > 3. : 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: >> >> >> >> >> > > From jwang at bcgsc.ca Mon Jun 27 19:28:05 2005 From: jwang at bcgsc.ca (Jing Wang) Date: Mon Jun 27 19:28:17 2005 Subject: [Petal] POST vs.GET In-Reply-To: <42BE8754.9050103@thinkfoo.com> References: <42BC6A13.1080108@bcgsc.ca> <20050624211407.GG3440@webarchitects.co.uk> <42BC8083.9080705@bcgsc.ca> <42BE8754.9050103@thinkfoo.com> Message-ID: <42C04535.100@bcgsc.ca> 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. : works fine; >> 2. : works fine; >> 3. : 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: >>> >>> >>> >>> >>> >> >>