Foggy Bottoms has asked for the wisdom of the Perl Monks concerning the following question:

Wisest monks,
   When I run the following (very) short code, an awkward error comes up. Does anyone have an idea where it can come from ? I'm pretty sure this is a record of the longest possible error for the shortest possible code, even though this wasn't my aim :-)
#!/usr/bin/perl use strict; use Win32; use Win32::GUI;

And here's the error :
Prototype mismatch: sub main::MB_ICONEXCLAMATION () vs none at D:/Perl/lib/Expor
ter.pm line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONWARNING () vs none at D:/Perl/lib/Exporter.
pm line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONINFORMATION () vs none at D:/Perl/lib/Expor
ter.pm line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONASTERISK () vs none at D:/Perl/lib/Exporter
.pm line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONQUESTION () vs none at D:/Perl/lib/Exporter
.pm line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONSTOP () vs none at D:/Perl/lib/Exporter.pm
line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONERROR () vs none at D:/Perl/lib/Exporter.pm
 line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
Prototype mismatch: sub main::MB_ICONHAND () vs none at D:/Perl/lib/Exporter.pm
line 57.
        Exporter::import('BS_3STATE', 'BS_AUTO3STATE', 'BS_AUTOCHECKBOX', 'BS_AU
TORADIOBUTTON', 'BS_CHECKBOX', 'BS_DEFPUSHBUTTON', 'BS_GROUPBOX', 'BS_LEFTTEXT',
 ...) called at D:\source\searchTest.pl line 10
        main::BEGIN() called at D:/Perl/site/lib/Win32/GUI.pm line 10
        eval {...} called at D:/Perl/site/lib/Win32/GUI.pm line 10
syntax error at D:\source\searchTest.pl line 20, near ")"
Execution of D:\source\searchTest.pl aborted due to compilation errors.
Heureux qui, comme Ulysse, a fait un beau voyage
Ou comme celui-là qui conquit la Toison,
Et puis est retourné plein d'usage et raison,
Vivre entre ses parents le reste de son âge!

J. du Bellay, poëte angevin

Replies are listed 'Best First'.
Re: Some odd error
by PodMaster (Abbot) on Jun 30, 2003 at 10:12 UTC
    Try
    perl -MWin32::GUI -le"print for keys %::" perl -MWin32 -le"print for keys %::"
    and compare. Then read `perldoc -f use', and then
    use Win32(); use Win32::GUI();

    MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
    I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
    ** The third rule of perl club is a statement of fact: pod is sexy.