matts 2003/08/11 14:05:21
Modified: axkit.org/docs/xsp guide.dkb
lib/Apache/AxKit/Language XSP.pm
Log:
Time::Object -> Time::Piece
Revision Changes Path
1.2 +2 -2 xml-axkit/axkit.org/docs/xsp/guide.dkb
Index: guide.dkb
===================================================================
RCS file: /home/cvs/xml-axkit/axkit.org/docs/xsp/guide.dkb,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- guide.dkb 13 Jan 2002 20:45:09 -0000 1.1
+++ guide.dkb 11 Aug 2003 21:05:21 -0000 1.2
@@ -200,14 +200,14 @@
<informalexample>
<programlisting><![CDATA[
<xsp:structure>
- <xsp:include>Time::Object</xsp:include>
+ <xsp:include>Time::Piece</xsp:include>
</xsp:structure>
<xsp:logic><![CDATA[
sub mytime {
my ($time) = @_;
$time ||= time;
- return Time::Object->new($time);
+ return Time::Piece->new($time);
}
]]>]]><![CDATA[</xsp:logic>
]]></programlisting>
1.48 +7 -7 xml-axkit/lib/Apache/AxKit/Language/XSP.pm
Index: XSP.pm
===================================================================
RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XSP.pm,v
retrieving revision 1.47
retrieving revision 1.48
diff -u -r1.47 -r1.48
--- XSP.pm 7 Aug 2003 10:36:57 -0000 1.47
+++ XSP.pm 11 Aug 2003 21:05:21 -0000 1.48
@@ -877,7 +877,7 @@
}
# otherwise we're in code now...
$output .= ".do{";
- while ($value =~ /\G([^}]*)}/gc) {
+ while ($value =~ /\G([^'"}]*)}/gc) {
$output .= _undouble_curlies($1);
if ($value =~ /\G}/gc) {
$output .= "}";
@@ -1232,7 +1232,7 @@
xmlns:xsp="http://apache.org/xsp/core/v1">
<xsp:structure>
- <xsp:import>Time::Object</xsp:import>
+ <xsp:import>Time::Piece</xsp:import>
</xsp:structure>
<page>
@@ -1597,7 +1597,7 @@
in parse_end:
if ($tag eq 'get-datetime') {
- $e->append_to_script('use Time::Object; localtime->strftime($format);');
+ $e->append_to_script('use Time::Piece; localtime->strftime($format);');
$e->end_expr();
return '';
}
@@ -1632,13 +1632,13 @@
(we'll see why we formatted it this way in #5 below). The first thing we
get is:
- $e->append_to_script('use Time::Object; localtime->strftime($format);');
+ $e->append_to_script('use Time::Piece; localtime->strftime($format);');
This does exactly what it says, and the script becomes:
do {
my ($format); $format = q|%a, %d %b %Y %H:%M:%S %z|;
- use Time::Object; localtime->strftime($format);
+ use Time::Piece; localtime->strftime($format);
Finally, we call:
@@ -1648,7 +1648,7 @@
do {
my ($format); $format = q|%a, %d %b %Y %H:%M:%S %z|;
- use Time::Object; localtime->strftime($format);
+ use Time::Piece; localtime->strftime($format);
}
Now if you execute that in Perl, you'll see the do {} returns the last