简体   繁体   English

未定义的子程序CGI :: radio

[英]Undefined subroutine CGI::radio

I have an application about a student data,and i am trying to make a radio-group which has options about gender of the student. 我有一个有关学生数据的应用程序,并且我正在尝试创建一个广播组,其中包含有关学生性别的选项。 But it shows me the following error: Undefined subroutine CGI::radio at C:/wamp/bin/apache/apache2.2.22/cgi-bin/modify.pl line 196 但是它向我显示了以下错误:C:/wamp/bin/apache/apache2.2.22/cgi-bin/modify.pl第196行的未定义子例程CGI :: radio

   $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'})))));  

What may be the problem? 可能是什么问题?

You are trying to call $q->radio-group but: 您正在尝试调用$q->radio-group但是:

  1. The - is being treated as a subtraction operator -被视为减法运算符
  2. The method is called radio_group (with an underscore) 该方法称为radio_group (带下划线)

See the documentation 请参阅说明文件

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM