pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/53388: p5-WWW-Curl-4.17nb9 .. Easy.pm doesn't export CURLOPT symbols



>Number:         53388
>Category:       pkg
>Synopsis:       p5-WWW-Curl-4.17nb9 .. Easy.pm doesn't export CURLOPT symbols
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Thu Jun 21 22:50:00 +0000 2018
>Originator:     Graham Jenkins
>Release:        7.1.2
>Organization:
G K Jenkins & Associates
>Environment:
NetBSD skink.dtdns.net 7.1.2 NetBSD 7.1.2 (GENERIC.201803151611Z) amd64
>Description:
CURLOPT options are not exported in Easy.pm, so that programs which use such options give errors like:
  Bareword "CURLOPT_URL" not allowed while "strict subs" in use
>How-To-Repeat:
Simple program:
--
#!/usr/bin/env perl
use strict;
use warnings;
use WWW::Curl::Easy;

sub get {                       # Usage: get($url)
  my ($string,$handle);
  open($handle,'>',\$string);
  my $curl=new WWW::Curl::Easy;
  $curl->setopt(CURLOPT_TIMEOUT,30);
  $curl->setopt(CURLOPT_URL,shift);
  $curl->setopt(CURLOPT_FILE,$handle);
  my $ret=$curl->perform();
  return $string
}

if ( defined(my $Address=get("http://v4.ident.me";) ) ) {
  print "Got $Address \n"
} else {
  print "Failed!\n"
}


>Fix:
Update p5-WWW-Curl and test.


Home | Main Index | Thread Index | Old Index