Tags: perl5 require IO::Socket::SSL Konstante SSL_VERIFY_CLIENT_ONCE importieren Similar Threads
Readers: 14
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use strict; use warnings; use Net::FTP; require IO::Socket::SSL; IO::Socket::SSL->import(SSL_VERIFY_CLIENT_ONCE); my $ftp = Net::FTP->new( 'irgendeinurl', SSL_verify_mode => SSL_VERIFY_CLIENT_ONCE, );
QuoteBareword "SSL_VERIFY_CLIENT_ONCE" not allowed while "strict subs" in use at test.pl line 7.
Bareword "SSL_VERIFY_CLIENT_ONCE" not allowed while "strict subs" in use at test.pl line 9.
Execution of test.pl aborted due to compilation errors.
1 2 3 4
BEGIN { require IO::Socket::SSL; IO::Socket::SSL->import( qw(SSL_VERIFY_CLIENT_ONCE) ); }
2015-04-14T15:32:36 GwenDragon
QuoteIch möchte das Modul CPAN:IO::Socket::SSL nicht per use sondern erst zur Laufzeit per require laden.
2015-04-14T18:29:33 GUIfreundAlso den BEGIN-Block weglassen.
1 2 3 4 5 6 7 8 9 10 11 12
#!/usr/bin/perl use strict; use warnings; use Net::FTP; require IO::Socket::SSL; IO::Socket::SSL->import( qw(SSL_VERIFY_CLIENT_ONCE) ); my $ftp = Net::FTP->new( 'irgendeinurl', SSL_verify_mode => SSL_VERIFY_CLIENT_ONCE, );
QuoteBareword "SSL_VERIFY_CLIENT_ONCE" not allowed while "strict subs" in use at test.pl line 9.
Execution of test.pl aborted due to compilation errors.
2015-04-15T08:22:50 RaubtierLösungsmöglichkeit:
SSL_VERIFY_CLIENT_ONCE() mit () verwenden
1 2 3 4 5 6 7 8 9 10 11
#!/usr/bin/perl use strict; use warnings; use Net::FTP; require IO::Socket::SSL; my $ftp = Net::FTP->new( 'irgendeinurl', SSL_verify_mode => SSL_VERIFY_CLIENT_ONCE(), );
QuoteUndefined subroutine &main::SSL_VERIFY_CLIENT_ONCE called at test.pl line 9.
1 2 3 4 5 6
require IO::Socket::SSL; IO::Socket::SSL->import(); my $ftp = Net::FTP->new( 'irgendeinurl', SSL_verify_mode => SSL_VERIFY_CLIENT_ONCE(), );
QuotePing-Anforderung konnte Host "test" nicht finden. Überprüfen Sie den Namen, und versuchen Sie es erneut.
1 2 3 4 5 6 7 8 9 10
use strict; use warnings; use Net::FTP; require IO::Socket::SSL; IO::Socket::SSL->import(); my $ftp = Net::FTP->new( 'irgendeinurl', SSL_verify_mode => SSL_VERIFY_CLIENT_ONCE(), );
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
Top 15 Subroutines
Calls P F Exclusive Inclusive Subroutine
Time Time
2 2 1 4.85s 4.85s Socket::getaddrinfo (xsub)
1 1 1 1.34s 1.34s Net::SSLeay::CTX_new (xsub)
1 1 1 1.23s 1.23s Net::SSLeay::RAND_poll (xsub)
1 1 1 59.8ms 66.5ms IO::Socket::SSL::BEGIN@20
1 1 1 52.2ms 53.8ms Mozilla::CA::BEGIN@7
7 7 7 49.9ms 49.9ms XSLoader::load
1 1 1 49.8ms 49.8ms Net::SSLeay::CTX_load_verify_locations (xsub)
1 1 1 38.9ms 1.42s Net::FTP::BEGIN@31
1 1 1 22.9ms 62.2ms Mozilla::CA::BEGIN@6
1 1 1 20.7ms 21.4ms Mozilla::CA::BEGIN@8
1 1 1 19.3ms 1.55s main::BEGIN@7
54 54 23 16.7ms 18.7ms Exporter::import
1 1 1 15.0ms 40.0ms IO::Socket::SSL::BEGIN@259
1 1 1 12.6ms 70.2ms Net::FTP::BEGIN@22
1 1 1 10.7ms 11.2ms Net::FTP::BEGIN@20