in reply to Re^3: Testing with Test::Mock::HTTP::Tiny
in thread Testing with Test::Mock::HTTP::Tiny

Since I have more time

Thank you...I was also thinking that JSON might be the sensible solution here.

eval() around JSON subs is because it dies on error last time I checked

It took a moment, but I worked that out before reading your confirmation...

But why fully qualify the methods that are exported by default?

$replay = eval { JSON::decode_json($replay) };
and not
$replay = eval { decode_json($replay) };

Replies are listed 'Best First'.
Re^5: Testing with Test::Mock::HTTP::Tiny
by bliako (Abbot) on Sep 28, 2023 at 09:22 UTC
    But why fully qualify the methods that are exported by default?

    as a mental note to myself that this sub is from that package

      as a mental note to myself that this sub is from that package

      That makes sense!

      I don't think I'll adopt this for obvious method names like encode_json but it seems a very sensible approach for methods that are rather ambiguous such as get in LWP::Simple