-
Notifications
You must be signed in to change notification settings - Fork 602
Description
Inspired by @rjbs's talk at the Perl Conference today, I decided to see what happens when you configure with -Dusedefaultstrict.
$ sh ./Configure -des -Dusedevel -Duseithreads -Dusedefaultstrict
# sanity check
$ grep -n strict config.sh
17:config_args='-des -Dusedevel -Duseithreads -Dusedefaultstrict'
22:config_arg4='-Dusedefaultstrict'
67:ccflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
90:cppflags='-DHAS_FPSETMASK -DHAS_FLOATINGPOINT_H -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include'
1155:usedefaultstrict='define'
$ make test_harness
[snip]
./miniperl -w -Ilib -Idist/Exporter/lib -MExporter -e '<?>' || sh -c 'echo >&2 Failed to build miniperl. Please run make minitest; exit 1'
./miniperl -Ilib -f write_buildcustomize.pl
./miniperl -Ilib make_patchnum.pl
Updating 'git_version.h' and 'lib/Config_git.pl'
./miniperl -Ilib configpm
written lib/Config.pod
updated lib/Config.pm
updated lib/Config_heavy.pl
./miniperl -Ilib utils/Makefile.PL
Global symbol "@ISA" requires explicit package name (did you forget to declare "my @ISA"?) at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 6.
Global symbol "@EXPORT" requires explicit package name (did you forget to declare "my @EXPORT"?) at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 7.
Global symbol "@EXPORT_OK" requires explicit package name (did you forget to declare "my @EXPORT_OK"?) at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 8.
Global symbol "$VERSION" requires explicit package name (did you forget to declare "my $VERSION"?) at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 10.
Global symbol "$SUBVERSION" requires explicit package name (did you forget to declare "my $SUBVERSION"?) at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 11.
BEGIN not safe after errors--compilation aborted at /usr/home/jkeenan/gitwork/perl/cpan/Text-Tabs/lib/Text/Wrap.pm line 13.
Compilation failed in require at ./regen/regen_lib.pl line 6.
BEGIN failed--compilation aborted at ./regen/regen_lib.pl line 6.
Compilation failed in require at utils/Makefile.PL line 16.
*** Error code 255
Stop.
make: stopped in /usr/home/jkeenan/gitwork/perl
This looked familiar.
When @atoomic and I were working on Sawyer's "Perl 7" proposal last year, we came to a point where Nico had flipped the bit that turned strictures on by default. We then had to proceed systematically to get make to complete, then make test_prep, and finally the whole test suite with make test_harness.
Several hundred commits and person-hours later ... we achieved that objective. (One then, of course, faces the challenge of getting CPAN code and darkpan code to run with strictures on by default.)
But until such time as we're willing to invest that time and effort, I don't see the point of offering the -Dusedefaultstrict configuration option in a production release of perl. We should remove it from blead and confine it to a branch.
Thank you very much.
Jim Keenan