You are viewing a plain text version of this content. The canonical link for it is here.
Posted to axkit-dev@xml.apache.org by ba...@apache.org on 2002/04/15 18:04:51 UTC
cvs commit: xml-axkit/lib/Apache/AxKit/Language/XSP TaglibHelper.pm
barries 02/04/15 09:04:50
Modified: lib/Apache/AxKit/Language/XSP TaglibHelper.pm
Log:
unbugger the SYNOPSIS, I hope
Revision Changes Path
1.4 +27 -10 xml-axkit/lib/Apache/AxKit/Language/XSP/TaglibHelper.pm
Index: TaglibHelper.pm
===================================================================
RCS file: /home/cvs/xml-axkit/lib/Apache/AxKit/Language/XSP/TaglibHelper.pm,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- TaglibHelper.pm 25 Mar 2002 07:30:42 -0000 1.3
+++ TaglibHelper.pm 15 Apr 2002 16:04:50 -0000 1.4
@@ -1,4 +1,4 @@
-# $Id: TaglibHelper.pm,v 1.3 2002/03/25 07:30:42 matts Exp $
+# $Id: TaglibHelper.pm,v 1.4 2002/04/15 16:04:50 barries Exp $
package Apache::AxKit::Language::XSP::TaglibHelper;
@ISA = qw(Apache::AxKit::Language::XSP);
@@ -515,20 +515,37 @@
=head1 SYNOPSIS
-Put this code at the top of your taglib module:
+ package My::Taglib;
- # this stuff, you change for each taglib
+ use Apache::AxKit::Language::XSP::TaglibHelper;
+
+ @ISA = qw( Apache::AxKit::Language::XSP::TaglibHelper );
+
+ ## Edit $NS to be the namespace URI you want
$NS = 'http://apache.org/xsp/testtaglib/v1';
+
+ ## Edit @EXPORT_TAGLIB as needed
@EXPORT_TAGLIB = (
- 'func1($arg1)',
- 'func2($arg1,$arg2)',
- 'func3($arg1,$arg2;$optarg)',
- 'func4($arg1,*treearg)',
- 'func4($arg1,*treearg):listtag=mylist:itemtag=item',
+ 'func1($arg1)',
+ 'func2($arg1,$arg2)',
+ 'func3($arg1,$arg2;$optarg)',
+ 'func4($arg1,*treearg)',
+ 'func4($arg1,*treearg):listtag=mylist:itemtag=item',
);
-...and then edit the $NS and @EXPORT_TAGLIB to reflect
-your taglib's namespace and list of functions, and just specify
+ use strict;
+
+ sub func1 {
+ my ( $arg1 ) = @_ ;
+ ...
+ return $scalar_or_reference;
+ }
+
+ ...
+
+ 1;
+
+
the functions with the same names as listed in C<@EXPORT_TAGLIB>.
=head1 DESCRIPTION