JIRA-REST-Class
view release on metacpan or search on metacpan
lib/JIRA/REST/Class/Mixins.pm view on Meta::CPAN
}
if ( $class eq 'REST::Client' ) {
return '%s->host(%s)', $class, $thing->getHost;
}
if ( $class eq 'DateTime' ) {
return "DateTime( $thing )";
}
if ( $top ) {
if ( reftype $thing eq 'ARRAY' ) {
chomp( my $data = Dumper( __array_copy( $thing ) ) );
return "bless( $data => $class )";
}
if ( reftype $thing eq 'HASH' ) {
chomp( my $data = Dumper( __hash_copy( $thing ) ) );
return "bless( $data => $class )";
}
return Dumper( $thing );
}
else {
my $fallback;
# see if the object has any of these methods
foreach my $method ( qw/ name key id / ) {
if ( $thing->can( $method ) ) {
my $value = $thing->$method;
( run in 0.348 second using v1.01-cache-2.11-cpan-3b35f9de6a3 )