diff options
author | gregor herrmann <gregoa@debian.org> | 2024-03-31 00:48:07 +0100 |
---|---|---|
committer | gregor herrmann <gregoa@debian.org> | 2024-03-31 00:48:07 +0100 |
commit | d640c313a428f33225fdcd215225b967fca9831c (patch) | |
tree | 1d881879f4883a5bef8edaddaf23a1ec7439b37f /lib/SMIME.pm | |
parent | bf0cd6220ff5d39813b7910c253692585fb83515 (diff) | |
parent | ebcac827145b32cbeefae3951fa348e92da5f91c (diff) |
Update upstream source from tag 'upstream/0.30'
Update to upstream version '0.30'
with Debian dir 1001afd4c784f8fb9389c3cb4fa6095dc7139a9a
Diffstat (limited to 'lib/SMIME.pm')
-rw-r--r-- | lib/SMIME.pm | 27 |
1 files changed, 26 insertions, 1 deletions
diff --git a/lib/SMIME.pm b/lib/SMIME.pm index ebfa629..563a093 100644 --- a/lib/SMIME.pm +++ b/lib/SMIME.pm @@ -17,7 +17,7 @@ our %EXPORT_TAGS = ( ); Exporter::export_ok_tags('constants'); -our $VERSION = '0.29'; +our $VERSION = '0.30'; XSLoader::load(__PACKAGE__, $VERSION); @@ -184,6 +184,31 @@ sub prepareSmimeMessage { } ($rest,$move); } +use Carp qw(croak); +sub AUTOLOAD { + # This AUTOLOAD is used to 'autoload' constants from the constant() + # XS function. + + my $constname; + our $AUTOLOAD; + ($constname = $AUTOLOAD) =~ s/.*:://; + croak "&Crypt::SMIME::constant not defined" if $constname eq 'constant'; + my ($error, $val) = constant($constname); + if ($error) { croak $error; } + { + no strict 'refs'; + # Fixed between 5.005_53 and 5.005_61 +#XXX if ($] >= 5.00561) { +#XXX *$AUTOLOAD = sub () { $val }; +#XXX } +#XXX else { + *$AUTOLOAD = sub { $val }; +#XXX } + } + goto &$AUTOLOAD; +} + + __END__ =encoding utf-8 |