Search code examples
perldbix-class

Why use this strange variant of package name?


Could someone explain me for which goals programmers use this variant "package name" like in that file SQLite.pm from DBIx::Class module? Full listing:

package # Hide from PAUSE
  DBIx::Class::SQLAHacks::SQLite;

use warnings;
use strict;

use base qw( DBIx::Class::SQLMaker::SQLite );

1;

Why the name of package is written on other line after 'package'?


Solution

  • Perl doesn't care about whitespace and comments between package and the package name, but the PAUSE indexer does. It won't index packages that look like that. The DBIx::Class folks don't want that class indexed.

    Another (more standard) way of doing this is the no_index key in the META.json or META.yml file.