CC: | "Luis E." Muñoz <lem [...] cantv.net> |
Subject: | CGI::FormBuilder::Source::YAML does not pass its own test |
Date: | Wed, 07 Nov 2007 15:51:42 -0400 |
To: | bug-CGI-FormBuilder-Source-YAML [...] rt.cpan.org |
From: | Ernesto Hernandez-Novich <emhnemhn [...] gmail.com> |
Tests 3 to 7 fail for CGI-FormBuilder-Source-YAML-1.0006. We believe it
is related to the fact that the testing program uses Test::Exception,
that in turn attempts to use B::Deparse on an XS function from
YAML::Syck, and that is impossible to do. Other than that, the module
seems to work fine.
Luis (CC'ed) is also seeing the problem on MacOSX.
To reproduce, after successfully running
$ perl Build.PL
$ perl Build
running
$ perl Build test
fails with
t/test....Attempt to free unreferenced scalar: SV 0x8592784, Perl
interpreter: 0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x85927a8, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x83ad630, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x83ad654, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x859279c, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x83ad5dc, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x8592790, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x8597bb4, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x83ad648, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
Attempt to free unreferenced scalar: SV 0x83ad5d0, Perl interpreter:
0x814e008 at /usr/share/perl5/Test/Exception.pm line 82.
# Failed test 'create form'
# in t/test.t at line 52.
# died: The result of B::Deparse::coderef2text was empty - maybe you're
trying to serialize an XS function?
# Failed test 'render form'
# in t/test.t at line 58.
# died: Can't call method "render" on an undefined value at t/test.t
line 57.
# Failed test 'compare html output'
# in t/test.t at line 68.
# got: undef
# expected: '<script type="text/javascript"><!-- hide from old
browsers
# function validate_test (form) {
# var alertstr = '';
# var invalid = 0;
#
# // test1: standard text, hidden, password, or textarea box
# var test1 = form.elements['test1'].value;
# if (test1 == null || ! test1.match(/^\w{3,10}$/)) {
# alertstr += '- Invalid entry for the "Test1" field\n';
# invalid++;
# }
# // test2: standard text, hidden, password, or textarea box
# var test2 = form.elements['test2'].value;
# if (test2 == null || ! test2.match(/^[\w\-\
+\._]+\@[a-zA-Z0-9][-a-zA-Z0-9\.]*\.[a-zA-Z]+$/)) {
# alertstr += '- Invalid entry for the "Test2" field\n';
# invalid++;
# }
# // test3: radio group or multiple checkboxes
# var test3 = null;
# var selected_test3 = 0;
# for (var loop = 0; loop < form.elements['test3'].length; loop++) {
# if (form.elements['test3'][loop].checked) {
# test3 = form.elements['test3'][loop].value;
# selected_test3++;
# if (test3 != null && test3 != "" && (test3 != '0' &&
test3 != '1')) {
# alertstr += '- Choose one of the "Test3" options\n';
# invalid++;
# }
# } // if
# } // for test3
#
# if (invalid > 0 || alertstr != '') {
# if (! invalid) invalid = 'The following'; // catch for
programmer error
# alert(''+invalid+' error(s) were encountered with your
submission:'+'\n\n'
# +alertstr+'\n'+'Please correct these fields and try
again.');
# // reset counters
# alertstr = '';
# invalid = 0;
# return false;
# }
# return true; // all checked ok
# }
# //-->
# </script>
# <noscript><font color="#cc0000"><b>Please enable Javascript or use a
newer browser.</b></font></noscript>
# <p>Fields that are <b>highlighted</b> are required.</p>
#
# <!-- Generated by CGI::FormBuilder v3.0401 available from
www.formbuilder.org -->
# <form action="/test" id="test" method="get" name="test"
onsubmit="return validate_test(this);">
# <div>
# <input id="_submitted_test" name="_submitted_test" type="hidden"
value="1" />
# <table>
# <tr id="test_test1_row" valign="top">
# <td id="test_test1_label"><b>Test1</b></td>
# <td id="test_test1_field"><input id="test1" maxlength="32"
name="test1" size="10" type="text" value="testing" /></td>
# </tr>
# <tr id="test_test2_row" valign="top">
# <td id="test_test2_label"><b>Test2</b></td>
# <td id="test_test2_field"><input id="test2" maxlength="32"
name="test2" size="10" type="text" value="test@test.foo" /></td>
# </tr>
# <tr id="test_test3_row" valign="top">
# <td id="test_test3_label">Test3</td>
# <td id="test_test3_field"><input id="test3_1" name="test3"
type="radio" value="1" /> <label for="test3_1">Yes</label>
# <input checked="checked" id="test3_0" name="test3" type="radio"
value="0" /> <label for="test3_0">No</label>
# </td>
# </tr>
# <tr id="test_test4_row" valign="top">
# <td id="test_test4_label">Test4</td>
# <td id="test_test4_field"><input id="test4_beef" name="test4"
type="radio" value="beef" /> <label for="test4_beef">Where's the
beef?</label>
# <input id="test4_chicken" name="test4" type="radio" value="chicken" />
<label for="test4_chicken">You coward!</label>
# <input id="test4_horta" name="test4" type="radio" value="horta" />
<label for="test4_horta">I feel ... pain!</label>
# </td>
# </tr>
# <tr id="test_submit_row" valign="top">
# <td align="center" colspan="2" id="test_submit_field"><input
id="test_submit" name="_submit" type="submit" value="test it" /></td>
# </tr>
# </table>
# </div>
# </form>
# '
Can't call method "submitted" on an undefined value at t/test.t line 70.
# Looks like you planned 7 tests but only ran 5.
# Looks like you failed 3 tests of 5 run.
# Looks like your test died just after 5.
dubious
Test returned status 255 (wstat 65280, 0xff00)
DIED. FAILED tests 3-7
Failed 5/7 tests, 28.57% okay
Failed Test Stat Wstat Total Fail Failed List of Failed
-------------------------------------------------------------------------------
t/test.t 255 65280 7 7 100.00% 3-7
Failed 1/1 test scripts, 0.00% okay. 5/7 subtests failed, 28.57% okay.
My Perl version:
Summary of my perl5 (revision 5 version 8 subversion 8) configuration:
Platform:
osname=linux, osvers=2.6.22-3-amd64,
archname=i486-linux-gnu-thread-multi
uname='linux deneb 2.6.22-3-amd64 #1 smp thu oct 11 15:23:23 utc
2007 i686 gnulinux '
config_args='-Dusethreads -Duselargefiles -Dccflags=-DDEBIAN
-Dcccdlflags=-fPIC -Darchname=i486-linux-gnu -Dprefix=/usr
-Dprivlib=/usr/share/perl/5.8 -Darchlib=/usr/lib/perl/5.8
-Dvendorprefix=/usr -Dvendorlib=/usr/share/perl5
-Dvendorarch=/usr/lib/perl5 -Dsiteprefix=/usr/local
-Dsitelib=/usr/local/share/perl/5.8.8
-Dsitearch=/usr/local/lib/perl/5.8.8 -Dman1dir=/usr/share/man/man1
-Dman3dir=/usr/share/man/man3 -Dsiteman1dir=/usr/local/man/man1
-Dsiteman3dir=/usr/local/man/man3 -Dman1ext=1 -Dman3ext=3perl
-Dpager=/usr/bin/sensible-pager -Uafs -Ud_csh -Uusesfio -Uusenm
-Duseshrplib -Dlibperl=libperl.so.5.8.8 -Dd_dosuid -des'
hint=recommended, useposix=true, d_sigaction=define
usethreads=define use5005threads=undef useithreads=define
usemultiplicity=define
useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
use64bitint=undef use64bitall=undef uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cc', ccflags ='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS
-DDEBIAN -fno-strict-aliasing -pipe -I/usr/local/include
-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64',
optimize='-O2',
cppflags='-D_REENTRANT -D_GNU_SOURCE -DTHREADS_HAVE_PIDS -DDEBIAN
-fno-strict-aliasing -pipe -I/usr/local/include'
ccversion='', gccversion='4.1.2 20061115 (prerelease) (Debian
4.1.1-21)', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=define, longlongsize=8, d_longdbl=define, longdblsize=12
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='off_t',
lseeksize=8
alignbytes=4, prototype=define
Linker and Libraries:
ld='cc', ldflags =' -L/usr/local/lib'
libpth=/usr/local/lib /lib /usr/lib
libs=-lgdbm -lgdbm_compat -ldb -ldl -lm -lpthread -lc -lcrypt
perllibs=-ldl -lm -lpthread -lc -lcrypt
libc=/lib/libc-2.3.6.so, so=so, useshrplib=true,
libperl=libperl.so.5.8.8
gnulibc_version='2.3.6'
Dynamic Linking:
dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags='-Wl,-E'
cccdlflags='-fPIC', lddlflags='-shared -L/usr/local/lib'
Characteristics of this binary (from libperl):
Compile-time options: MULTIPLICITY PERL_IMPLICIT_CONTEXT
PERL_MALLOC_WRAP THREADS_HAVE_PIDS USE_ITHREADS
USE_LARGE_FILES USE_PERLIO USE_REENTRANT_API
Built under linux
Compiled at Nov 5 2007 06:11:48
@INC:
/etc/perl
/usr/local/lib/perl/5.8.8
/usr/local/share/perl/5.8.8
/usr/lib/perl5
/usr/share/perl5
/usr/lib/perl/5.8
/usr/share/perl/5.8
/usr/local/lib/site_perl
.
This is running on Debian GNU/Linux Etch 4.0 up to date
Linux trillian 2.6.18-m-bs #1 SMP PREEMPT Fri Sep 28 11:08:44 VET 2007
i686 GNU/Linux
--
Ernesto Hernández-Novich - Linux 2.6.18 i686 - Unix: Live free or die!
Geek by nature, Linux by choice, Debian of course.
If you can't aptitude it, it isn't useful or doesn't exist.
GPG Key Fingerprint = 438C 49A2 A8C7 E7D7 1500 C507 96D6 A3D6 2F4C 85E3