You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Should it dump fields? I don't know. Data::Dumper is duty-bound to only print valid perl code that theoretically someone could eval() again to recreate a decent approximation to the original value that was passed in.
Example, in this case:
class HiddenField {
field $x; ADJUST { $x = int( rand * 256 ) }
}
my$obj = HiddenField->new;
Dumper($obj)
what valid perl code should be printed? What can you possibly eval() again to recreate that object?
Alternative thought: Data::Dumper being duty-bound to print valid eval()-able Perl code, means it cannot and should never support this. We should train users out of expecting to use Data::Dumper just to get some human-readable debug printing, and instead supply them with a better (core-supported) mechanism that doesn't have that restriction. Something like Data::Printer perhaps.
The text was updated successfully, but these errors were encountered: