Skip to content

Instantly share code, notes, and snippets.

@mephinet
Created October 25, 2016 10:17
Show Gist options
  • Save mephinet/c3e3d93c805381155712da46b3801edd to your computer and use it in GitHub Desktop.
Save mephinet/c3e3d93c805381155712da46b3801edd to your computer and use it in GitHub Desktop.
Unittest for Log::Any stringification of refs
#! /usr/bin/env perl
use strict;
use warnings;
use Test::More;
use Log::Any '$log';
use Log::Any::Adapter 'Test';
use URI;
my $uri = URI->new('http://slashdot.org/');
$log->infof( 'Fetching %s', $uri );
is_deeply(
Log::Any::Adapter::Test->msgs->[0]->{message},
'Fetching http://slashdot.org/',
'URI was correctly stringified'
);
done_testing;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment