Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: How do I test a script that doesn't have a .pl extension

by kielstirling (Scribe)
on Nov 02, 2012 at 02:25 UTC ( #1001905=note: print w/ replies, xml ) Need Help??


in reply to How do I test a script that doesn't have a .pl extension

Hi, works for me. try putting the path to the file in the require ie...

require '/path/to/file/';


Comment on Re: How do I test a script that doesn't have a .pl extension
Download Code
Re^2: How do I test a script that doesn't have a .pl extension
by ten8ciousb (Initiate) on Nov 02, 2012 at 19:45 UTC
    yes require 'foo' works, but require_ok(foo) fails. that is what threw me.
    I'm trying to add a suite of tests that can go from server to server, OS to OS. the full path will not always be the same. and the tests are not all at the same directory level.
    I am actually using a BEGIN block which finds a common ancestor directory and then builds the lib path from there.
    further testing has shown that even if foo is in the test directory, require_ok(foo) doesn't work

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (9)
As of 2014-07-28 07:55 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (193 votes), past polls