Skip to content

Fix ->shorten() returning hash rather than string in commandline app #3

@bpj

Description

@bpj

In the commandline app the line

print $bitly->shorten(URL => shift @ARGV), $/ while @ARGV;

should be changed into

print $bitly->shorten(URL => shift @ARGV)->{url}, $/ while @ARGV;

or even better

for ( @ARGV ) {
    my $url = $bitly->shorten( URL => $_ );
    $url = $url->{url} if 'HASH' eq ref $url;
    print $url, $/;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions