Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Test::More is_deeply and binary data

by tobyink (Canon)
on Nov 08, 2013 at 22:54 UTC ( [id://1061789]=note: print w/replies, xml ) Need Help??


in reply to Test::More is_deeply and binary data

This should do the trick:

if (eval { require Unicode::Debug }) { my $builder = Test::More->builder; binmode $builder->$_, ':via(UnicodeDebug)' for qw/ output failure_output todo_output /; }

It will pass all Test::More's output via Unicode::Debug, but only if Unicode::Debug is installed.

(Note that Unicode::Debug currently outputs some warning messages under Perl 5.18.x. I really need to fix that.)

Update: Unicode::Debug 0.002 fixes these warnings, and includes the above example.

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name

Replies are listed 'Best First'.
Re^2: Test::More is_deeply and binary data
by ig (Vicar) on Nov 08, 2013 at 23:07 UTC

    That works very nicely!! Thanks for the quick response. I'll read up on Test::Builder, which I haven't looked at before.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1061789]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2024-04-19 23:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found