All the Perl that's Practical to Extract and Report

Navigation

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Without JavaScript enabled, you might want to
use the classic discussion system instead. If you login, you can remember this preference.

I was under the impression that it wouldn't trigger warnings, but it does. So there's no difference apparently.

I now have this:

{ no warnings 'redefine', 'prototype'; sub create_table() {0}}

I'm still a little puzzled by the prototype, though. I seem to remember that this way would get optimized away, so that not even the arguments to the sub would be evaluated. But I'm wrong about that, apparently.

Maybe if you put it in a BEGIN block instead of a naked block? And/or ahead of your "use Class::DBI::mysql". The problem is that you're compiling some use of that subroutine before you're compiling this code.