Well, might be possible with those hacks. However there would be some more simpler solutions to this if we just need to compile check a list of perl files. For example a file 'a' consisting a statement of requiring file 'b' at runtime, compile checking file a with conditions which makes file b execute does serve the purpose. might sound towards code coverage or static analysis tools. some kind of custom test scenarios scripted down can also come as a rescue...
Regards & Thanks mailto: [email protected] --- On Wed, 8/4/10, Ludwig, Michael <[email protected]> wrote: > From: Ludwig, Michael <[email protected]> > Subject: Programmatically compiling (perl -c) a Perl file > To: [email protected] > Date: Wednesday, August 4, 2010, 12:57 PM > As a basic quality check against a > needy code base, I want to ensure that every file at least > compiles (perl -c). Some don't because they are require'd at > runtime by others and depend on them to have set their > global variables. And some die due to stuff in their BEGIN > blocks, which should go to INIT. > > I could certainly collect a list of file and call "perl -c" > on each of them. > > However, I'm curious: Is it possible to invoke the compiler > programmatically using the O and B::* modules? How exactly? > Haven't discovered this in: > > * perlcompile > * O > * B > > Feel free to redirect me to a more appropriate forum. > Thanks. > -- > Michael Ludwig > _______________________________________________ > ActivePerl mailing list > [email protected] > To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs > _______________________________________________ ActivePerl mailing list [email protected] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
