in reply to Re^3: Too difficult for me...
in thread Too difficult for me...
Using the rules of this syntax, consider a request something like;$result = $qd->{$data};
This is a silly example I know, but I can't think of any other way to express the nature of the system.action.pl?action=test&a=b&b=c&c=42
Output : 42listing of /actions/test/body.aXML ---------------------------------- <qd><qd><qd>a</qd></qd></qd>
the innermost qd tag runs, and in the query we find that $qd->{'a'} = 'b'; the result 'b' is then handed off to the next tag in the expression0: <qd><qd><qd>a</qd></qd></qd>
once again the plugin qd is called, only this time it is fed the result of the previous call, which was the letter 'b'. If we look up the key 'b' in the query data, we get the letter 'c'.1: <qd><qd>b</qd></qd>
and since in the query c = 42, the result of the expression2 : <qd>c</qd>
is 42.<qd><qd><qd>a</qd></qd></qd>
now if that plugin is placed in the core plugins folder, any page on any site on the server can use the tag,listing of "/plugins/sayhello.aXMLpi" ------------------------------------- $result = "hello $data monks";
and the page will contain the result "hello perl monks".<sayhello>perl</sayhello>
will produce "hello java monks"... etc etc.<sayhello>java</sayhello>
we get "hello PERL monks".if our query data contains a key value pair 'who' => 'PERL' and we include into the document; <sayhello><qd>who</qd></sayhello>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^5: Too difficult for me...
by Corion (Patriarch) on Jun 19, 2011 at 12:16 UTC | |
by simonodell (Acolyte) on Jun 19, 2011 at 12:39 UTC | |
by Corion (Patriarch) on Jun 19, 2011 at 12:55 UTC | |
|
Re^5: Too difficult for me...
by simonodell (Acolyte) on Jun 19, 2011 at 12:20 UTC |