Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
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 ( [id://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
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1001905]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others chanting in the Monastery: (3)
As of 2026-01-16 00:02 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    What's your view on AI coding assistants?





    Results (118 votes). Check out past polls.

    Notices?
    hippoepoptai's answer Re: how do I set a cookie and redirect was blessed by hippo!
    erzuuliAnonymous Monks are no longer allowed to use Super Search, due to an excessive use of this resource by robots.