Hello

We are using TaglibHelper for more than 1.5 years now. It has always been mainly my colleagues who are writing the taglibs, and they have quite many times come to me with a problem they couldn't solve. The problem is then that in most cases the error message was just an error in the generated perl code. It then always takes (for me who didn't write the code :) quite some patience to find out what's wrong. This makes TaglibHelper seem quite fragile.

Today my colleague got such an error because he misspelled the taglibfunction definition in his taglib. (See example below). Seems like having a tag <mytaglib:myfunction/> in an .xsp file without a corresponding definition in @EXPORT_TAGLIB breaks TaglibHelper.

Shouldn't TaglibHelper stop building code right when it encounters a tag that has no definition?

Christian.

---

Example:
Today my colleague got the following error, because he misspelled the taglibfunction definition in this taglib:


package LifeCMS::Taglib::navigation;
use Apache::AxKit::Language::XSP::TaglibHelper;
@ISA = qw/Apache::AxKit::Language::XSP::TaglibHelper/;
$NS = 'http://apache.org/xsp/LifeCMS/Taglib/navigation';
@EXPORT_TAGLIB = (
                  'navigaton($arg):as_xml=1',
                 ); ##   ^^-- typo
use strict;
sub navigation {
    warn "!!! called NS  navigation\n";
}
1;


Error:


[Sat Mar 29 21:21:26 2003] [error] [client 129.132.19.123] [AxKit] [Error] Compilation failed: Global
symbol "%_args" requires explicit package name at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1.
syntax error at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1, near """


# line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start"
$_args"
Global symbol "%_args" requires explicit package name at XSP generated by LifeCMS::Taglib::navigation::parse_start line 1.



Part of the generated XSP code:


23 __mk_text_node($document, $parent, "" . do {
24 # line 1 "XSP generated by LifeCMS::Taglib::info::parse_start"
25 { my %_args = ();
26 # line 429 "XSP generated by /usr/local/lib/perl/5.6.1/Apache/AxKit/Language/XSP/TaglibHelper.pm"
27 ; Apache::AxKit::Language::XSP::TaglibHelper::handle_result('sectionname()', undef(), 0, $document, $parent, LifeCMS::Taglib::info::sectionname());}
28 }); # non xsp tag
29
30 # line 1 "XSP generated by LifeCMS::Taglib::info::parse_end"
31 $parent = $parent->getParentNode;
32 $parent = __mk_element_node($document, $parent, q|left_column|);
33
34 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start"
35 $_args{navigation} = ""
36
37 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_start"
38 $_args{arg} = ""
39 . q|1|
40 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_end"
41 ;
42
43 # line 1 "XSP generated by LifeCMS::Taglib::navigation::parse_end"
44 ;


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to