#!/usr/bin/perl -- use strict; use warnings; use CGI::Pretty; my %labels = ( 'eenie' => 'your first choice', 'meenie' => 'your second choice', 'minie' => 'your third choice' ); print "\n------ broken (the example in the docs), unsurprising, its untested ----------\n"; print CGI::Pretty->checkbox_group( 'group_name', [ 'eenie', 'meenie', 'minie', 'moe' ], [ 'eenie', 'moe' ], 'true', \%labels, { 'moe' => { 'class' => 'red' }, 'eenie' => { 'class' => 'yo' }, } ); print "\n----- works (also documented but untested) -----------\n"; print CGI::Pretty->checkbox_group( -name => 'group_name', -values => [ 'eenie', 'meenie', 'minie', 'moe' ], -default => [ 'eenie', 'moe' ], -linebreak => 'true', -labels => \%labels, -attributes => { 'moe' => { 'class' => 'red' }, 'eenie' => { 'class' => 'yo' }, } ); __END__ ------ broken (the example in the docs), unsurprising, its untested ----------



----- works (also documented but untested) -----------