Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plack::Util::load_psgi: guard against hitting the identifier length limit #663

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Feb 19, 2021

  1. Plack::Util::load_psgi: guard against hitting the identifier length l…

    …imit
    
    When Plack is asked to load a path with a psgi app inside,
    ala /foo/bar/app.psgi, it first generates a namespace for
    the file -- something like Plack::Sandbox::_2ffoo_2fbar_2fapp_2epsgi.
    
    Those "sandboxed" namespaces can get very long.  Long enough
    that they hit Perl's identifier limit of ~250 characters
    (see https://perldoc.perl.org/perldiag#Identifier-too-long).
    
    This commit patches Plack::Util::load_psgi()
    that always generates paths shorter than the threshold,
    and jumps through some hoops to ensure that no two
    applications end up sharing namespaces after the trimming.
    Hugmeir committed Feb 19, 2021
    Configuration menu
    Copy the full SHA
    97e215f View commit details
    Browse the repository at this point in the history