From 50408b29ad75d975902d8fc51212c66750d73899 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sun, 27 Nov 2022 04:14:05 -0700 Subject: [PATCH 1/7] starter skel --- README.md | 14 ++++ author.yml | 5 +- dist.ini | 30 ++++++++- lib/Net/Swirl/CurlVersion/FFI.pm | 27 ++++++++ t/00_diag.t | 108 +++++++++++++++++++++++++++++++ 5 files changed, 178 insertions(+), 6 deletions(-) create mode 100644 README.md create mode 100644 lib/Net/Swirl/CurlVersion/FFI.pm create mode 100644 t/00_diag.t diff --git a/README.md b/README.md new file mode 100644 index 0000000..a222b84 --- /dev/null +++ b/README.md @@ -0,0 +1,14 @@ +# Net::Swirl::CurlVersion ![static](https://github.com/uperl/Net-Swirl-CurlVersion/workflows/static/badge.svg) ![linux](https://github.com/uperl/Net-Swirl-CurlVersion/workflows/linux/badge.svg) + +Get version information about curl + +# AUTHOR + +Graham Ollis + +# COPYRIGHT AND LICENSE + +This software is copyright (c) 2022 by Graham Ollis. + +This is free software; you can redistribute it and/or modify it under +the same terms as the Perl 5 programming language system itself. diff --git a/author.yml b/author.yml index 40420cc..43c6f13 100644 --- a/author.yml +++ b/author.yml @@ -11,6 +11,5 @@ pod_coverage: skip: 0 # format is "Class#method" or "Class",regex allowed # for either Class or method. - private: [] - - + private: + - Net::Swirl::CurlVersion::FFI diff --git a/dist.ini b/dist.ini index 4db60bd..8df1a7f 100644 --- a/dist.ini +++ b/dist.ini @@ -17,9 +17,33 @@ workflow = linux version_plugin = PkgVersion::Block irc = irc://irc.perl.org/#native -[Author::Plicease::Core] +diag = +Alien::curl -[Author::Plicease::Upload] -cpan = 0 +diag_preamble = | $post_diag = sub { +diag_preamble = | local $@=''; +diag_preamble = | my $lib = eval { +diag_preamble = | require Net::Swirl::CurlVersion::FFI; +diag_preamble = | Net::Swirl::CurlVersion::FFI->lib; +diag_preamble = | }; +diag_preamble = | diag "warning: $@" if $@; +diag_preamble = | diag "lib = @{[ $lib // 'undef' ]}"; +diag_preamble = | $@ = ''; +diag_preamble = | my $version = eval { +diag_preamble = | require FFI::Platypus; +diag_preamble = | FFI::Platypus->VERSION("2.00"); +diag_preamble = | my $ffi = FFI::Platypus->new( api => 2, lib => [$lib] ); +diag_preamble = | $ffi->function('curl_version' => [] => 'string')->call; +diag_preamble = | }; +diag_preamble = | diag "warning: $@" if $@; +diag_preamble = | if(defined $version) { +diag_preamble = | diag "version = $_" for split /\s+/, $version; +diag_preamble = | } +diag_preamble = | }; +[Author::Plicease::Core] +[Author::Plicease::Upload] +cpan = 1 +[DynamicPrereqs / Alien] +-condition = do { require './lib/Net/Swirl/CurlVersion/FFI.pm'; ! eval { Net::Swirl::CurlVersion::FFI->lib; 1 } } +-body = requires('Alien::curl', '0.10'); diff --git a/lib/Net/Swirl/CurlVersion/FFI.pm b/lib/Net/Swirl/CurlVersion/FFI.pm new file mode 100644 index 0000000..1585648 --- /dev/null +++ b/lib/Net/Swirl/CurlVersion/FFI.pm @@ -0,0 +1,27 @@ +package Net::Swirl::CurlVersion::FFI { + + use warnings; + use 5.020; + use FFI::CheckLib 0.30 qw( find_lib_or_die ); + +# ABSTRACT: Private class for Net::Swirl::CurlVersion + +=head1 SYNOPSIS + + $ perldoc Net::Swirl::CurlVersion + +=head1 DESCRIPTION + +There is nothing to see here. Please see the main documentation page at +L. + +=cut + + sub lib + { + $ENV{NET_SWIRL_CURL_DLL} // find_lib_or_die( lib => 'curl', symbol => ['curl_version_info'], alien => ['Alien::curl'] ); + } + +} + +1; diff --git a/t/00_diag.t b/t/00_diag.t new file mode 100644 index 0000000..227ac29 --- /dev/null +++ b/t/00_diag.t @@ -0,0 +1,108 @@ +use Test2::V0 -no_srand => 1; +use Config; + +eval { require 'Test/More.pm' }; + +# This .t file is generated. +# make changes instead to dist.ini + +my %modules; +my $post_diag; + +$modules{$_} = $_ for qw( + Alien::curl + ExtUtils::MakeMaker + FFI::CheckLib + FFI::Platypus + Test2::V0 +); + +$post_diag = sub { + local $@=''; + my $lib = eval { + require Net::Swirl::CurlVersion::FFI; + Net::Swirl::CurlVersion::FFI->lib; + }; + diag "warning: $@" if $@; + diag "lib = @{[ $lib // 'undef' ]}"; + $@ = ''; + my $version = eval { + require FFI::Platypus; + FFI::Platypus->VERSION("2.00"); + my $ffi = FFI::Platypus->new( api => 2, lib => [$lib] ); + $ffi->function('curl_version' => [] => 'string')->call; + }; + diag "warning: $@" if $@; + if(defined $version) { + diag "version = $_" for split /\s+/, $version; + } +}; + +my @modules = sort keys %modules; + +sub spacer () +{ + diag ''; + diag ''; + diag ''; +} + +pass 'okay'; + +my $max = 1; +$max = $_ > $max ? $_ : $max for map { length $_ } @modules; +our $format = "%-${max}s %s"; + +spacer; + +my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV; + +if(@keys > 0) +{ + diag "$_=$ENV{$_}" for @keys; + + if($ENV{PERL5LIB}) + { + spacer; + diag "PERL5LIB path"; + diag $_ for split $Config{path_sep}, $ENV{PERL5LIB}; + + } + elsif($ENV{PERLLIB}) + { + spacer; + diag "PERLLIB path"; + diag $_ for split $Config{path_sep}, $ENV{PERLLIB}; + } + + spacer; +} + +diag sprintf $format, 'perl', "$] $^O $Config{archname}"; + +foreach my $module (sort @modules) +{ + my $pm = "$module.pm"; + $pm =~ s{::}{/}g; + if(eval { require $pm; 1 }) + { + my $ver = eval { $module->VERSION }; + $ver = 'undef' unless defined $ver; + diag sprintf $format, $module, $ver; + } + else + { + diag sprintf $format, $module, '-'; + } +} + +if($post_diag) +{ + spacer; + $post_diag->(); +} + +spacer; + +done_testing; + From 1233c7a48df7da77d379c27cce5a0d9360895859 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sun, 27 Nov 2022 04:16:39 -0700 Subject: [PATCH 2/7] need FFI::CheckLib at configure time --- dist.ini | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dist.ini b/dist.ini index 8df1a7f..f95fedc 100644 --- a/dist.ini +++ b/dist.ini @@ -44,6 +44,9 @@ diag_preamble = | }; [Author::Plicease::Upload] cpan = 1 +[Prereqs / ConfigureRequires] +FFI::CheckLib = 0.30 + [DynamicPrereqs / Alien] -condition = do { require './lib/Net/Swirl/CurlVersion/FFI.pm'; ! eval { Net::Swirl::CurlVersion::FFI->lib; 1 } } -body = requires('Alien::curl', '0.10'); From 284db91bdc99eb8e1b68499ebc91c1ba3bf016b0 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sun, 27 Nov 2022 04:34:55 -0700 Subject: [PATCH 3/7] get ssl backends method --- lib/Net/Swirl/CurlVersion.pm | 42 +++++++++++++++++++++++++++++++++++- t/net_swirl_curlversion.t | 7 +++++- 2 files changed, 47 insertions(+), 2 deletions(-) diff --git a/lib/Net/Swirl/CurlVersion.pm b/lib/Net/Swirl/CurlVersion.pm index 3cd7bcf..15996ab 100644 --- a/lib/Net/Swirl/CurlVersion.pm +++ b/lib/Net/Swirl/CurlVersion.pm @@ -1,11 +1,51 @@ use warnings; use 5.020; use experimental qw( postderef signatures ); +use FFI::Platypus 2.00; +use Net::Swirl::CurlVersion::FFI; +use FFI::C; + +my $ffi = FFI::Platypus->new( + api => 2, + lib => [Net::Swirl::CurlVersion::FFI->lib], +); + +FFI::C->ffi($ffi); + +package Net::Swirl::CurlVersion::CurlSslBackend { + FFI::C->struct(curl_ssl_backend => [ + id => 'enum', + _name => 'opaque', + ]); + + sub name ($self) + { + $ffi->cast( opaque => string => $self->_name ); + } +} + package Net::Swirl::CurlVersion { # ABSTRACT: Get version information about curl + +=head1 METHODS + +=head2 get_ssl_backends + + my @backends = Net::Swirl::CurlVersion->get_ssl_backends; + +Get the list of SSL backends (as strings). + +=cut + + sub get_ssl_backends ($class) { + my $ptr; + my $ret = $ffi->function( curl_global_sslset => [ 'senum', 'string', 'opaque*' ] => 'enum' )->call(-1, undef, \$ptr); + # TODO: check ret and throw error + map { $ffi->cast('opaque','curl_ssl_backend', $_)->name } $ffi->cast('opaque','opaque[]',$ptr)->@*; + } + } 1; - diff --git a/t/net_swirl_curlversion.t b/t/net_swirl_curlversion.t index 6ccf4ed..3ff8b15 100644 --- a/t/net_swirl_curlversion.t +++ b/t/net_swirl_curlversion.t @@ -1,7 +1,12 @@ use Test2::V0 -no_srand => 1; use Net::Swirl::CurlVersion; -ok 1, 'todo'; +subtest 'get_ssl_backends' => sub { + + ok 1; + note $_ for Net::Swirl::CurlVersion->get_ssl_backends; + +}; done_testing; From 01e1857390e9027db1712ae943aa999f9f7bf6e7 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Sun, 27 Nov 2022 04:35:47 -0700 Subject: [PATCH 4/7] remove unsupported Perls from CI --- .github/workflows/linux.yml | 6 ------ 1 file changed, 6 deletions(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 4d84fdb..7b796bb 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -27,12 +27,6 @@ jobs: - "5.24" - "5.22" - "5.20" - - "5.18" - - "5.16" - - "5.14" - - "5.12" - - "5.10" - - "5.8" env: CIP_TAG: ${{ matrix.cip_tag }} From 5c435cce108f36d8a0db92a7dbaeb8ff8013639b Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Mon, 17 Jun 2024 17:20:21 -0600 Subject: [PATCH 5/7] rename to Net::LibCURL::Version --- README.md | 15 +++++++-- author.yml | 2 +- dist.ini | 8 ++--- lib/Net/LibCURL/FFI.pm | 32 +++++++++++++++++++ .../CurlVersion.pm => LibCURL/Version.pm} | 10 +++--- lib/Net/Swirl/CurlVersion/FFI.pm | 27 ---------------- t/00_diag.t | 5 +-- ...rl_curlversion.t => net_libcurl_version.t} | 4 +-- 8 files changed, 60 insertions(+), 43 deletions(-) create mode 100644 lib/Net/LibCURL/FFI.pm rename lib/Net/{Swirl/CurlVersion.pm => LibCURL/Version.pm} (78%) delete mode 100644 lib/Net/Swirl/CurlVersion/FFI.pm rename t/{net_swirl_curlversion.t => net_libcurl_version.t} (53%) diff --git a/README.md b/README.md index a222b84..aa71abf 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,17 @@ -# Net::Swirl::CurlVersion ![static](https://github.com/uperl/Net-Swirl-CurlVersion/workflows/static/badge.svg) ![linux](https://github.com/uperl/Net-Swirl-CurlVersion/workflows/linux/badge.svg) +# Net::LibCURL::FFI ![static](https://github.com/uperl/Net-LibCurl-Version/workflows/static/badge.svg) ![linux](https://github.com/uperl/Net-LibCurl-Version/workflows/linux/badge.svg) -Get version information about curl +Private class for Net::LibCURL + +# SYNOPSIS + +``` +$ perldoc Net::LibCURL +``` + +# DESCRIPTION + +There is nothing to see here. Please see the main documentation page at +[Net::LibCURL](https://metacpan.org/pod/Net::LibCURL). # AUTHOR diff --git a/author.yml b/author.yml index 43c6f13..8fa7f17 100644 --- a/author.yml +++ b/author.yml @@ -12,4 +12,4 @@ pod_coverage: # format is "Class#method" or "Class",regex allowed # for either Class or method. private: - - Net::Swirl::CurlVersion::FFI + - Net::LibCURL::FFI diff --git a/dist.ini b/dist.ini index f95fedc..8962601 100644 --- a/dist.ini +++ b/dist.ini @@ -1,4 +1,4 @@ -name = Net-Swirl-CurlVersion +name = Net-LibCurl-Version author = Graham Ollis license = Perl_5 copyright_holder = Graham Ollis @@ -22,8 +22,8 @@ diag = +Alien::curl diag_preamble = | $post_diag = sub { diag_preamble = | local $@=''; diag_preamble = | my $lib = eval { -diag_preamble = | require Net::Swirl::CurlVersion::FFI; -diag_preamble = | Net::Swirl::CurlVersion::FFI->lib; +diag_preamble = | require Net::LibCURL::FFI; +diag_preamble = | Net::LibCURL::FFI->lib; diag_preamble = | }; diag_preamble = | diag "warning: $@" if $@; diag_preamble = | diag "lib = @{[ $lib // 'undef' ]}"; @@ -48,5 +48,5 @@ cpan = 1 FFI::CheckLib = 0.30 [DynamicPrereqs / Alien] --condition = do { require './lib/Net/Swirl/CurlVersion/FFI.pm'; ! eval { Net::Swirl::CurlVersion::FFI->lib; 1 } } +-condition = do { require './lib/Net/LibCURL/FFI.pm'; ! eval { Net::LibCURL::FFI->lib; 1 } } -body = requires('Alien::curl', '0.10'); diff --git a/lib/Net/LibCURL/FFI.pm b/lib/Net/LibCURL/FFI.pm new file mode 100644 index 0000000..df93d47 --- /dev/null +++ b/lib/Net/LibCURL/FFI.pm @@ -0,0 +1,32 @@ +package Net::LibCURL::FFI { + + use warnings; + use 5.020; + use FFI::CheckLib 0.30 qw( find_lib_or_die ); + +# ABSTRACT: Private class for Net::LibCURL + +=head1 SYNOPSIS + + $ perldoc Net::LibCURL + +=head1 DESCRIPTION + +There is nothing to see here. Please see the main documentation page at +L. + +=cut + + sub lib + { + return $ENV{NET_LIBCURL_DLL} // + find_lib_or_die( + lib => 'curl', + symbol => ['curl_version_info'], + alien => ['Alien::curl'], + ); + } + +} + +1; diff --git a/lib/Net/Swirl/CurlVersion.pm b/lib/Net/LibCURL/Version.pm similarity index 78% rename from lib/Net/Swirl/CurlVersion.pm rename to lib/Net/LibCURL/Version.pm index 15996ab..19d561e 100644 --- a/lib/Net/Swirl/CurlVersion.pm +++ b/lib/Net/LibCURL/Version.pm @@ -2,17 +2,17 @@ use warnings; use 5.020; use experimental qw( postderef signatures ); use FFI::Platypus 2.00; -use Net::Swirl::CurlVersion::FFI; +use Net::LibCURL::FFI; use FFI::C; my $ffi = FFI::Platypus->new( api => 2, - lib => [Net::Swirl::CurlVersion::FFI->lib], + lib => [Net::LibCURL::FFI->lib], ); FFI::C->ffi($ffi); -package Net::Swirl::CurlVersion::CurlSslBackend { +package Net::LibCURL::Version::CurlSslBackend { FFI::C->struct(curl_ssl_backend => [ id => 'enum', _name => 'opaque', @@ -25,7 +25,7 @@ package Net::Swirl::CurlVersion::CurlSslBackend { } -package Net::Swirl::CurlVersion { +package Net::LibCURL::Version { # ABSTRACT: Get version information about curl @@ -33,7 +33,7 @@ package Net::Swirl::CurlVersion { =head2 get_ssl_backends - my @backends = Net::Swirl::CurlVersion->get_ssl_backends; + my @backends = Net::LibCURL::Version->get_ssl_backends; Get the list of SSL backends (as strings). diff --git a/lib/Net/Swirl/CurlVersion/FFI.pm b/lib/Net/Swirl/CurlVersion/FFI.pm deleted file mode 100644 index 1585648..0000000 --- a/lib/Net/Swirl/CurlVersion/FFI.pm +++ /dev/null @@ -1,27 +0,0 @@ -package Net::Swirl::CurlVersion::FFI { - - use warnings; - use 5.020; - use FFI::CheckLib 0.30 qw( find_lib_or_die ); - -# ABSTRACT: Private class for Net::Swirl::CurlVersion - -=head1 SYNOPSIS - - $ perldoc Net::Swirl::CurlVersion - -=head1 DESCRIPTION - -There is nothing to see here. Please see the main documentation page at -L. - -=cut - - sub lib - { - $ENV{NET_SWIRL_CURL_DLL} // find_lib_or_die( lib => 'curl', symbol => ['curl_version_info'], alien => ['Alien::curl'] ); - } - -} - -1; diff --git a/t/00_diag.t b/t/00_diag.t index 227ac29..9f091e0 100644 --- a/t/00_diag.t +++ b/t/00_diag.t @@ -12,6 +12,7 @@ my $post_diag; $modules{$_} = $_ for qw( Alien::curl ExtUtils::MakeMaker + FFI::C FFI::CheckLib FFI::Platypus Test2::V0 @@ -20,8 +21,8 @@ $modules{$_} = $_ for qw( $post_diag = sub { local $@=''; my $lib = eval { - require Net::Swirl::CurlVersion::FFI; - Net::Swirl::CurlVersion::FFI->lib; + require Net::LibCURL::FFI; + Net::LibCURL::FFI->lib; }; diag "warning: $@" if $@; diag "lib = @{[ $lib // 'undef' ]}"; diff --git a/t/net_swirl_curlversion.t b/t/net_libcurl_version.t similarity index 53% rename from t/net_swirl_curlversion.t rename to t/net_libcurl_version.t index 3ff8b15..8837d73 100644 --- a/t/net_swirl_curlversion.t +++ b/t/net_libcurl_version.t @@ -1,10 +1,10 @@ use Test2::V0 -no_srand => 1; -use Net::Swirl::CurlVersion; +use Net::LibCURL::Version; subtest 'get_ssl_backends' => sub { ok 1; - note $_ for Net::Swirl::CurlVersion->get_ssl_backends; + note $_ for Net::LibCURL::Version->get_ssl_backends; }; From e4c805652cd88af415176870f037df1c071e84fa Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Mon, 17 Jun 2024 17:29:43 -0600 Subject: [PATCH 6/7] bump CI perls --- .github/workflows/linux.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 7b796bb..0ae8df4 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -17,7 +17,8 @@ jobs: fail-fast: false matrix: cip_tag: - - "5.37" + - "5.39" + - "5.38" - "5.36" - "5.34" - "5.32" From 4352b68d51ca04ee2b7f46859708005b5a6f1157 Mon Sep 17 00:00:00 2001 From: Graham Ollis Date: Mon, 17 Jun 2024 17:33:45 -0600 Subject: [PATCH 7/7] rename again --- README.md | 8 ++++---- author.yml | 2 +- dist.ini | 8 ++++---- lib/{Net => Web}/LibCURL/FFI.pm | 8 ++++---- lib/{Net => Web}/LibCURL/Version.pm | 10 +++++----- t/00_diag.t | 4 ++-- t/{net_libcurl_version.t => web_libcurl_version.t} | 4 ++-- 7 files changed, 22 insertions(+), 22 deletions(-) rename lib/{Net => Web}/LibCURL/FFI.pm (77%) rename lib/{Net => Web}/LibCURL/Version.pm (80%) rename t/{net_libcurl_version.t => web_libcurl_version.t} (54%) diff --git a/README.md b/README.md index aa71abf..15a0e96 100644 --- a/README.md +++ b/README.md @@ -1,17 +1,17 @@ -# Net::LibCURL::FFI ![static](https://github.com/uperl/Net-LibCurl-Version/workflows/static/badge.svg) ![linux](https://github.com/uperl/Net-LibCurl-Version/workflows/linux/badge.svg) +# Web::LibCURL::FFI ![static](https://github.com/uperl/Web-LibCurl-Version/workflows/static/badge.svg) ![linux](https://github.com/uperl/Web-LibCurl-Version/workflows/linux/badge.svg) -Private class for Net::LibCURL +Private class for Web::LibCURL # SYNOPSIS ``` -$ perldoc Net::LibCURL +$ perldoc Web::LibCURL ``` # DESCRIPTION There is nothing to see here. Please see the main documentation page at -[Net::LibCURL](https://metacpan.org/pod/Net::LibCURL). +[Web::LibCURL](https://metacpan.org/pod/Web::LibCURL). # AUTHOR diff --git a/author.yml b/author.yml index 8fa7f17..2409bc9 100644 --- a/author.yml +++ b/author.yml @@ -12,4 +12,4 @@ pod_coverage: # format is "Class#method" or "Class",regex allowed # for either Class or method. private: - - Net::LibCURL::FFI + - Web::LibCURL::FFI diff --git a/dist.ini b/dist.ini index 8962601..9e209a8 100644 --- a/dist.ini +++ b/dist.ini @@ -1,4 +1,4 @@ -name = Net-LibCurl-Version +name = Web-LibCurl-Version author = Graham Ollis license = Perl_5 copyright_holder = Graham Ollis @@ -22,8 +22,8 @@ diag = +Alien::curl diag_preamble = | $post_diag = sub { diag_preamble = | local $@=''; diag_preamble = | my $lib = eval { -diag_preamble = | require Net::LibCURL::FFI; -diag_preamble = | Net::LibCURL::FFI->lib; +diag_preamble = | require Web::LibCURL::FFI; +diag_preamble = | Web::LibCURL::FFI->lib; diag_preamble = | }; diag_preamble = | diag "warning: $@" if $@; diag_preamble = | diag "lib = @{[ $lib // 'undef' ]}"; @@ -48,5 +48,5 @@ cpan = 1 FFI::CheckLib = 0.30 [DynamicPrereqs / Alien] --condition = do { require './lib/Net/LibCURL/FFI.pm'; ! eval { Net::LibCURL::FFI->lib; 1 } } +-condition = do { require './lib/Web/LibCURL/FFI.pm'; ! eval { Web::LibCURL::FFI->lib; 1 } } -body = requires('Alien::curl', '0.10'); diff --git a/lib/Net/LibCURL/FFI.pm b/lib/Web/LibCURL/FFI.pm similarity index 77% rename from lib/Net/LibCURL/FFI.pm rename to lib/Web/LibCURL/FFI.pm index df93d47..f5205b9 100644 --- a/lib/Net/LibCURL/FFI.pm +++ b/lib/Web/LibCURL/FFI.pm @@ -1,19 +1,19 @@ -package Net::LibCURL::FFI { +package Web::LibCURL::FFI { use warnings; use 5.020; use FFI::CheckLib 0.30 qw( find_lib_or_die ); -# ABSTRACT: Private class for Net::LibCURL +# ABSTRACT: Private class for Web::LibCURL =head1 SYNOPSIS - $ perldoc Net::LibCURL + $ perldoc Web::LibCURL =head1 DESCRIPTION There is nothing to see here. Please see the main documentation page at -L. +L. =cut diff --git a/lib/Net/LibCURL/Version.pm b/lib/Web/LibCURL/Version.pm similarity index 80% rename from lib/Net/LibCURL/Version.pm rename to lib/Web/LibCURL/Version.pm index 19d561e..4541273 100644 --- a/lib/Net/LibCURL/Version.pm +++ b/lib/Web/LibCURL/Version.pm @@ -2,17 +2,17 @@ use warnings; use 5.020; use experimental qw( postderef signatures ); use FFI::Platypus 2.00; -use Net::LibCURL::FFI; +use Web::LibCURL::FFI; use FFI::C; my $ffi = FFI::Platypus->new( api => 2, - lib => [Net::LibCURL::FFI->lib], + lib => [Web::LibCURL::FFI->lib], ); FFI::C->ffi($ffi); -package Net::LibCURL::Version::CurlSslBackend { +package Web::LibCURL::Version::CurlSslBackend { FFI::C->struct(curl_ssl_backend => [ id => 'enum', _name => 'opaque', @@ -25,7 +25,7 @@ package Net::LibCURL::Version::CurlSslBackend { } -package Net::LibCURL::Version { +package Web::LibCURL::Version { # ABSTRACT: Get version information about curl @@ -33,7 +33,7 @@ package Net::LibCURL::Version { =head2 get_ssl_backends - my @backends = Net::LibCURL::Version->get_ssl_backends; + my @backends = Web::LibCURL::Version->get_ssl_backends; Get the list of SSL backends (as strings). diff --git a/t/00_diag.t b/t/00_diag.t index 9f091e0..fd41bb3 100644 --- a/t/00_diag.t +++ b/t/00_diag.t @@ -21,8 +21,8 @@ $modules{$_} = $_ for qw( $post_diag = sub { local $@=''; my $lib = eval { - require Net::LibCURL::FFI; - Net::LibCURL::FFI->lib; + require Web::LibCURL::FFI; + Web::LibCURL::FFI->lib; }; diag "warning: $@" if $@; diag "lib = @{[ $lib // 'undef' ]}"; diff --git a/t/net_libcurl_version.t b/t/web_libcurl_version.t similarity index 54% rename from t/net_libcurl_version.t rename to t/web_libcurl_version.t index 8837d73..bcf311c 100644 --- a/t/net_libcurl_version.t +++ b/t/web_libcurl_version.t @@ -1,10 +1,10 @@ use Test2::V0 -no_srand => 1; -use Net::LibCURL::Version; +use Web::LibCURL::Version; subtest 'get_ssl_backends' => sub { ok 1; - note $_ for Net::LibCURL::Version->get_ssl_backends; + note $_ for Web::LibCURL::Version->get_ssl_backends; };