Presenter::Tag::link - umbenannt in link_tag
authorSven Schöling <s.schoeling@linet-services.de>
Thu, 25 Jan 2018 10:56:56 +0000 (11:56 +0100)
committerSven Schöling <s.schoeling@linet-services.de>
Thu, 25 Jan 2018 10:56:56 +0000 (11:56 +0100)
um Namenskonflikte mit dem link builtin zu vermeiden

SL/Presenter/Tag.pm
SL/Template/Plugin/L.pm

index 696ec56..80dca58 100644 (file)
@@ -10,7 +10,7 @@ use Exporter qw(import);
 our @EXPORT_OK = qw(
   html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag
   checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag
-  stringify_attributes restricted_html textarea_tag link date_tag
+  stringify_attributes restricted_html textarea_tag link_tag date_tag
 );
 our %EXPORT_TAGS = (ALL => \@EXPORT_OK);
 
@@ -323,13 +323,15 @@ sub textarea_tag {
   html_tag('textarea', $content, %attributes, name => $name);
 }
 
-sub link {
+sub link_tag {
   my ($href, $content, %params) = @_;
 
   $href ||= '#';
 
   html_tag('a', $content, %params, href => $href);
 }
+# alias for compatibility
+sub link { goto &link_tag }
 
 sub date_tag {
   my ($name, $value, %params) = @_;
index 7403ae4..b38365b 100644 (file)
@@ -78,7 +78,7 @@ sub simple_format { return _call_presenter('simple_format', @_); }
 sub button_tag               { return _call_presenter('button_tag',               @_); }
 sub submit_tag               { return _call_presenter('submit_tag',               @_); }
 sub ajax_submit_tag          { return _call_presenter('ajax_submit_tag',          @_); }
-sub link                     { return _call_presenter('link',                     @_); }
+sub link                     { return _call_presenter('link_tag',                 @_); }
 sub input_number_tag         { return _call_presenter('input_number_tag',         @_); }
 sub textarea_tag             { return _call_presenter('textarea_tag',             @_); }
 sub date_tag                 { return _call_presenter('date_tag',                 @_); }