468,250 Members | 1,561 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,250 developers. It's quick & easy.

how to use this require_ok($file);


In Perl manual i found :
but what is this file( what file & is any extension needed). i got require_ok($module);

Please give some examples.
Jan 22 '07 #1
4 2418
4,059 Expert 2GB
require_ok() is a function but not a core perl function, $file is a scalar, presumably the name of a file, that is being passed to the function. If you are asking how to "require" a moule in a perl script that is not the way to do it.

Jan 22 '07 #2
but what i need is regarding the automated test ing in Perl. It is the Perl funtion which is inbuilt. you can find in "man perldoc Test::More" (i.e, manual pages of Perl).

It would be great if you can give some information.
Thank you.
Jan 22 '07 #3
1,089 Expert 1GB

require_ok is simply a test to determine if a module or file can be can be require'd. This is often the first test done by cpan module authors.
Jan 22 '07 #4
4,059 Expert 2GB
Test::More is a module, it may very well have a require_ok() function. I don't know anything about that module myself or how to use it.
Jan 22 '07 #5

Post your reply

Sign in to post your reply or Sign up for a free account.

By using this site, you agree to our Privacy Policy and Terms of Use.