Section 18.8. Exercises


18.8. Exercises

You can find the answers to these exercises in "Answers for Chapter 18" in the Appendix.

18.8.1. Exercise 1 [20 min]

Document the My::List::Util module you created in the exercise for Chapter 17. Add a test for the POD documentation using Test::Pod.

18.8.2. Exercise 2 [20 min]

Write your own test module, Test::My::List::Util, that has a single test function, sum_ok, which takes two arguments: the actual sum and the expected sum. Print a diagnostic message if the two do not match.

 my $sum = sum( 2, 2 ); sum_ok( $sum, 4 ); 




Intermediate Perl
Intermediate Perl
ISBN: 0596102062
EAN: 2147483647
Year: N/A
Pages: 238

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net