develooper Front page | perl.perl5.porters | Postings from April 2014

[perl #121648] Syntax check which ignores 'use' directives

Ricardo SIGNES via RT
April 22, 2014 13:08
[perl #121648] Syntax check which ignores 'use' directives
Message ID:
This should be do-able with an @INC hook.  Check the documentation for `require` (in perlfunc) and look for the section beginning:

    You can also insert hooks into the import facility by putting
    Perl code directly into the @INC array.  There are three forms
    of hooks: subroutine references, array references, and blessed

With this feature, you should be able add a coderef to the very end of @INC, which just returns "1" for anything not found before that.

I think you will find this less useful than you predict, but you can code it up and find out easily enough!

At any rate, this feature can be written outside of the core, and its inclusion in core discussed when it has proven indispensable. 


via perlbug:  queue: perl5 status: open Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About