Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: a7483bec00
Fetching contributors…

Cannot retrieve contributors at this time

file 33 lines (23 sloc) 0.464 kb
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33
use v6;

use Test;

plan(2);

unless (try { eval("1", :lang<perl5>) }) {
    skip_rest;
    exit;
}

eval q<<<

use Digest::MD5:from<perl5> <md5_hex>;

sub get_dmd5 {
my $ctx = Digest::MD5.new;
return($ctx);
}

{
is( md5_hex('test'), '098f6bcd4621d373cade4e832627b4f6', 'perl5 function exported' );
}

{
my $ctx = get_dmd5();
$ctx.add('test');
is( $ctx.hexdigest, '098f6bcd4621d373cade4e832627b4f6', 'XS return' );
}

>>>;

# vim: ft=perl6
Something went wrong with that request. Please try again.