develooper Front page | perl.perl5.porters | Postings from February 2003

[perl #21350] h2xs 1.22: ExtUtils::Constant generate 1.t always passes.

Thread Previous | Thread Next
Sander van Zoest
February 24, 2003 06:09
[perl #21350] h2xs 1.22: ExtUtils::Constant generate 1.t always passes.
Message ID:
# New Ticket Created by  Sander van Zoest 
# Please include the string:  [perl #21350]
# in the subject line of all future correspondence about this issue. 
# <URL: >

This is a bug report for perl from
generated with the help of perlbug 1.34 running under perl v5.8.0.

[Please enter your report here]
The following generated test code for MusicBrainz::Queries always
returns a false positive regardless of the actual existance of
the ExtUtils::Constant constants.
Even when adding MusicBrainz::Queries qw(:all) to actually export
the constants and 'use strict' adding another constname it would
would claim to pass, eventhough the constant doesn't exist.
When altering some of the code, I can get the error below, but without
altering the test code, it seems to always return true.

Bareword "DOES_NOT_EXIST_SANDER_VAN_ZOEST" not allowed while "strict subs" in us
e at - line 45.

# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl 1.t'


# change 'tests => 2' to 'tests => last_test_to_print';

use Test;
BEGIN { plan tests => 2 };
use MusicBrainz::Queries;
ok(1); # If we made it this far, we're ok.

my $fail;
foreach my $constname (qw(
	MBE_AlbumGetAlbumArtistId MBE_AlbumGetAlbumId MBE_AlbumGetAlbumName
	MBE_AlbumGetAlbumStatus MBE_AlbumGetAlbumType MBE_AlbumGetArtistId
	MBE_AlbumGetArtistName MBE_AlbumGetArtistSortName
	MBE_AlbumGetNumCdindexIds MBE_AlbumGetNumTracks
	MBE_AlbumGetTrackDuration MBE_AlbumGetTrackId MBE_AlbumGetTrackList
	MBE_AlbumGetTrackName MBE_AlbumGetTrackNum MBE_ArtistGetAlbumId
	MBE_ArtistGetAlbumName MBE_ArtistGetArtistId MBE_ArtistGetArtistName
	MBE_ArtistGetArtistSortName MBE_AuthGetChallenge MBE_AuthGetSessionId
	MBE_GetError MBE_GetNumAlbums MBE_GetNumArtists MBE_GetNumLookupResults
	MBE_GetNumTracks MBE_GetNumTrmids MBE_GetStatus MBE_LookupGetAlbumId
	MBE_LookupGetArtistId MBE_LookupGetRelevance MBE_LookupGetTrackId
	MBE_LookupGetType MBE_QuerySubject MBE_QuickGetAlbumName
	MBE_QuickGetArtistName MBE_QuickGetTrackDuration MBE_QuickGetTrackId
	MBE_QuickGetTrackName MBE_QuickGetTrackNum MBE_TOCGetCDIndexId
	MBE_TOCGetFirstTrack MBE_TOCGetLastTrack MBE_TOCGetTrackNumSectors
	MBE_TOCGetTrackSectorOffset MBE_TrackGetArtistId MBE_TrackGetArtistName
	MBE_TrackGetArtistSortName MBE_TrackGetTrackDuration
	MBE_TrackGetTrackId MBE_TrackGetTrackName MBE_TrackGetTrackNum
	MBQ_FileInfoLookup MBQ_FindAlbumByName MBQ_FindArtistByName
	MBQ_FindDistinctTRMId MBQ_FindTrackByName MBQ_GetAlbumById
	MBQ_GetArtistById MBQ_GetCDInfo MBQ_GetCDInfoFromCDIndexId MBQ_GetCDTOC
	MBQ_GetTrackById MBQ_GetTrackByTRMId MBQ_QuickTrackInfoFromTrackId
	MBQ_SubmitTrack MBQ_SubmitTrackTRMId MBQ_TrackInfoFromTRMId MBS_Back
	MBS_Rewind MBS_SelectAlbum MBS_SelectArtist MBS_SelectCdindexid
	MBS_SelectLookupResult MBS_SelectLookupResultAlbum
	MBS_SelectLookupResultArtist MBS_SelectLookupResultTrack
	MBS_SelectTrack MBS_SelectTrackAlbum MBS_SelectTrackArtist
	MBS_SelectTrmid)) {
  next if (eval "my \$a = $constname; 1");
  if ($@ =~ /^Your vendor has not defined MusicBrainz::Queries macro $constname/) {
    print "# pass: $@";
  } else {
    print "# fail: $@";
    $fail = 1;    
if ($fail) {
  print "not ok 2\n";
} else {
  print "ok 2\n";

[Please do not change anything below this line]
Site configuration information for perl v5.8.0:

Configured by sander at Wed Feb  5 08:33:52 GMT 2003.

Summary of my perl5 (revision 5.0 version 8 subversion 0) configuration:
    osname=freebsd, osvers=4.6-stable-20020710, archname=i386-freebsd
    uname='freebsd 4.6-stable-20020710 freebsd 4.6-stable-20020710 #0: thu jul 11 00:46:45 pdt 2002 i386 '
    config_args='-sde -Dprefix=/usr/local -Darchlib=/usr/local/lib/perl5/5.8.0/mach -Dprivlib=/usr/local/lib/perl5/5.8.0 -Dman3dir=/usr/local/lib/perl5/5.8.0/man/man3 -Dsitearch=/usr/local/lib/perl5/site_perl/5.8.0/mach -Dsitelib=/usr/local/lib/perl5/site_perl/5.8.0 -Ui_malloc -Ui_iconv -Uinstallusrbinperl -Dccflags=-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN" -Ui_gdbm -Dusemymalloc=n'
    hint=recommended, useposix=true, d_sigaction=define
    usethreads=undef use5005threads=undef useithreads=undef usemultiplicity=undef
    useperlio=define d_sfio=undef uselargefiles=define usesocks=undef
    use64bitint=undef use64bitall=undef uselongdouble=undef
    usemymalloc=n, bincompat5005=undef
    cc='cc', ccflags ='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include',
    optimize='-O -pipe ',
    cppflags='-DAPPLLIB_EXP="/usr/local/lib/perl5/5.8.0/BSDPAN" -DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -I/usr/local/include'
    ccversion='', gccversion='2.95.4 20020320 [FreeBSD]', 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 ='-Wl,-E  -L/usr/local/lib'
    libpth=/usr/lib /usr/local/lib
    libs=-lm -lc -lcrypt -lutil
    perllibs=-lm -lc -lcrypt -lutil
    libc=, so=so, useshrplib=false, libperl=libperl.a
  Dynamic Linking:
    dlsrc=dl_dlopen.xs, dlext=so, d_dlsymun=undef, ccdlflags=' '
    cccdlflags='-DPIC -fPIC', lddlflags='-shared  -L/usr/local/lib'

Locally applied patches:

@INC for perl v5.8.0:

Environment for perl v5.8.0:
    LANG (unset)
    LANGUAGE (unset)
    LD_LIBRARY_PATH (unset)
    LOGDIR (unset)
    PERL_BADLANG (unset)

Thread Previous | Thread Next Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About