I think you might have better luck posting what the actual error is. You're
just saying that your code isn't working, and I'm inferring from your
subject that it's something to do with SSL, but you've not posted the
actual error.
Also, please make sure you're running the latest version of Mojolicious -
`mojo version`.
CORE
Perl (v5.18.2, linux)
Mojolicious (5.37, Tiger Face)
OPTIONAL
EV 4.0+ (not installed)
IO::Socket::IP 0.20+ (not installed)
IO::Socket::Socks 0.64+ (not installed)
IO::Socket::SSL 1.84+ (1.997)
This version is up to date, have fun!
This is the installation on one of my environments, and it works fine with
SSL.
perl -Mojo -E 'say g("https://www.google.com/")->dom("title")->text;'
On Sunday, 31 August 2014 00:57:14 UTC+1, Colin Crossman wrote:
>
> I'm banging my head agains the wall trying to work with this. I have
> IO::Socket::SSL 1.997 installed, and that's what's installed on the
> production system (can't change).
>
> The only advice I've found has been to add
> BEGIN{$ENV{MOJO_NO_TLS} = 1}
> however that doesn't seem to work either.
>
> This is the code it's breaking:
> any [qw(GET POST)] => '/smsin' => sub {
> my $plist = shift;
> my $xml = '';
> my $Text = $plist->param('Text') || 'null';
> my $From = $plist->param('From') || '0000000000';
> my $To = $plist->param('To') || '0000000000';
> my $MsgID = $plist->param('MessageUUID') || 'null'; my $ua = Mojo::
> UserAgent->new;
> my $url = "https://$MailgunAPI\@$MailgunURL";
>
> my $MailgunPost = {
> 'from' => "0000000000\@example.com",
> 'to' => "foo\@example.com",
> 'subject' => "Text from $From",
> 'text' => "$Text"
> };
>
> my $tx = $ua->post( $url => form => $MailgunPost);
>
> if (my $res = $tx->success) {
> $xml = "<Response>"."</Response>";
> } else {
> my $err = $tx->error;
> $xml = "<Response> msg : ".$err->{message}."\n code : ".$err->{code
> }."</Response>";
> }
>
> $plist->render(data => $xml, format => 'xml');
> };
>
>
>
>
>
> Any ideas?
>
--
You received this message because you are subscribed to the Google Groups
"Mojolicious" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mojolicious.
For more options, visit https://groups.google.com/d/optout.