Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Perl syntax checking without `perl -c`

by davido (Cardinal)
on Dec 03, 2020 at 23:24 UTC ( #11124613=note: print w/replies, xml ) Need Help??


in reply to Perl syntax checking without `perl -c`

Another solution is to insert a subroutine into @INC that checks a list of modules to fake (rather than a full filesystem approach). If the required module is in your list, the @INC sub instantiates a stub, or simply modifies %INC to fake that the module is already loaded. See require for how to do this. I remember doing it a few years ago but haven't retained that recollection. :)

I may have dived into this a bit in a Perl Conference talk in 2017: Spilling the @INC.

Update: So despite my grasping for words in the talk it does look like around 22 minutes in I begin discussing how to stick a subref into @INC that manufactures modules and a subroutine within the module (which isn't strictly necessary).


Dave

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://11124613]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (7)
As of 2021-02-26 16:49 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?