Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
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/';

Replies are listed 'Best First'.
Re^2: How do I test a script that doesn't have a .pl extension
by ten8ciousb (Novice) 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 snow settles gently...

How do I use this? | Other CB clients
Other Users?
Others exploiting the Monastery: (10)
As of 2016-12-07 22:36 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:













    Results (132 votes). Check out past polls.