[interchange-cvs] interchange - racke modified
code/UserTag/get_url.tag
interchange-cvs at icdevgroup.org
interchange-cvs at icdevgroup.org
Fri Nov 2 15:26:00 EST 2007
User: racke
Date: 2007-11-02 20:26:00 GMT
Modified: code/UserTag get_url.tag
Log:
added scratch option to save returned content into a scratch variable
instead of returning it, justification: [get-url] doesn't work inside of [perl]
and binary content might get mangled by the parser
Revision Changes Path
1.11 +8 -2 interchange/code/UserTag/get_url.tag
rev 1.11, prev_rev 1.10
Index: get_url.tag
===================================================================
RCS file: /var/cvs/interchange/code/UserTag/get_url.tag,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- get_url.tag 30 Mar 2007 23:40:57 -0000 1.10
+++ get_url.tag 2 Nov 2007 20:26:00 -0000 1.11
@@ -5,12 +5,12 @@
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version. See the LICENSE file for details.
#
-# $Id: get_url.tag,v 1.10 2007/03/30 23:40:57 pajamian Exp $
+# $Id: get_url.tag,v 1.11 2007/11/02 20:26:00 racke Exp $
UserTag get-url Order url
UserTag get-url AddAttr
UserTag get-url Interpolate
-UserTag get-url Version $Revision: 1.10 $
+UserTag get-url Version $Revision: 1.11 $
UserTag get-url Routine <<EOR
require LWP::UserAgent;
sub {
@@ -78,6 +78,12 @@
$html =~ s/.*<body[^>]*>//si;
$html =~ s:</body>.*::si;
}
+
+ if ($opt->{scratch}) {
+ $::Scratch->{$opt->{scratch}} = $html;
+ return;
+ }
+
return $html;
}
EOR
More information about the interchange-cvs
mailing list