Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to fallback to core object stringification?

Tags:

perl

A package overloads stringification operator:

use overload '""' => sub { ... };

But in some places I want to fallback to default stringification behaviour.

What should I do to such objects to get Object=HASH(0x7693218) string again?

print ${ \$obj }; # Did not help
like image 947
Eugen Konkov Avatar asked Mar 28 '17 17:03

Eugen Konkov


1 Answers

overload provides

overload::StrVal($arg)
like image 118
ikegami Avatar answered Nov 15 '22 16:11

ikegami