473,320 Members | 1,695 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

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 2677
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

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

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.