Hello fellow Monks,

Recently I released the Unicode::Peek thanks to everyone suggestions and ideas. While I was still adding some test cases that every now and then that come to my mind I got this error today Can't locate Test/Exception.pm in....

I know what the error stands for, but I am impressed that this module is not installed on CPANPLUS. I have added some test cases on my module that I want to capture croak error message from Carp module.

When I searched online most articles that I found they suggest that this is the module that someone should use on die test cases. Sample of successful compiling test case code (test.t):

#########################

use utf8;
use strict;
use warnings;

use Test::More tests => 3;
BEGIN { use_ok('Test::Exception') };
BEGIN { use_ok('Unicode::Peek', qw( :all )) };

#########################

throws_ok { hexDumperOutput('Test', '這是一個測試') }
	  qr/Unknown encoding format 'Test'/,
	  'Check encoding formats hexDumperOutput';

__END__

$ perl t/test.t
1..3
ok 1 - use Test::Exception;
ok 2 - use Unicode::Peek;
ok 3 - Check encoding formats hexDumperOutput

I assumed that by default this is a core module and it would be installed by default but I guess I was wrong.

Does any one know any other way of testing croak? I have tried a few other suggestions e.g. Testing error handling that calls "die" but so far not successfully.

Thanks in advance for everyone time and effort reading and replying to my question.

Seeking for Perl wisdom...on the process of learning...not there...yet!

In reply to Error: Can't locate Test/Exception.pm in @INC (you may need to install the Test::Exception module) on CPANPLUS by thanos1983

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.