Last active
August 29, 2015 14:03
-
-
Save zmughal/710a327a5103c0c14a23 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DateTime does stringify | |
2014-06-29T21:49:50 | |
---- | |
PDL does not stringify | |
0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use v5.16; | |
use DateTime; | |
say "DateTime @{[ does_it_stringify( DateTime->now ) ]} stringify"; | |
say DateTime->now; | |
say "----"; | |
use PDL; | |
say "PDL @{[ does_it_stringify( pdl() ) ]} stringify"; | |
say pdl(); | |
sub does_it_stringify { | |
defined overload::Method( $_[0] , '""' ) ? "does" : "does not"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Fix: https://sourceforge.net/p/pdl/bugs/356/