【问题标题】:Undefined subroutine CGI::radio未定义的子程序 CGI::radio
【发布时间】:2013-08-18 19:37:08
【问题描述】:

我有一个关于学生数据的应用程序,我正在尝试创建一个可以选择学生性别的广播组。但它向我显示以下错误:未定义的子程序 CGI::radio 在 C:/wamp/bin/apache/apache2.2.22/cgi-bin/modify.pl 第 196 行

   $cInput .= $q->div({-class => 'control-group'},
                    $q->label({-class => 'control-label', -for => 'gender'}, "Gender:"), 
                    $q->div({class => 'controls'}, 
                    $q->span({class => 'span12'},
                    $q->label({-class => 'blue'},
                    $q->radio-group({-id => 'gender', -name => 'gender', -values => ['M','F'],-labels => \%labels, -default => $cGender, 'true'})))));  

可能是什么问题?

【问题讨论】:

    标签: perl cgi


    【解决方案1】:

    您正在尝试拨打$q->radio-group,但是:

    1. - 被视为减法运算符
    2. 方法名为radio_group(带下划线)

    the documentation

    【讨论】:

    • 现在它不会向我显示按钮只是值。可能是什么问题?
    猜你喜欢
    • 1970-01-01
    • 2021-04-16
    • 2013-06-25
    • 2019-08-11
    • 2017-02-23
    • 1970-01-01
    • 2013-11-09
    • 2015-10-22
    相关资源
    最近更新 更多