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);

28
Hai!


In Perl manual i found :
require_ok($file);
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
KevinADC
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.

http://perldoc.perl.org/functions/require.html
Jan 22 '07 #2
ramapv
28
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
miller
1,089 Expert 1GB
http://perldoc.perl.org/Test/More.html

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
KevinADC
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.