3 thoughts on “Still on the [b]leading edge

  1. package WebServer::DirIndex;
    # The package declaration might seem
    # superfluous. However it prevents
    # errors when using an older CPAN
    # version that doesn’t yet understand
    # class. It can be removed when the
    # entire planet (and maybe even the ISS)
    # are using Module::Metadata 1.000038
    # or greater.

  2. If you use Dist::Zilla to publish your module, there’s a plugin that will insert the redundant package declaration for you at dist build time, keeping your actual sources nice and clean.

    Dist::Zilla::Plugin::ExplicitPackageForClass

    (The plugin happens to have been written by me because I ran into this same issue a few years ago. Mentioning it here on the off chance it might help somebody.)

    1. Thanks. That might be useful to some readers. Personally, I every time I’ve gone near Dist::Zilla I’ve ended up in a spiral of confusion 🙂

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.