The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

DiaColloDB::threads::shared - wrapper for threads/shared.pm or forks/shared.pm

SYNOPSIS

 ##========================================================================
 ## PRELIMINARIES
 
 use DiaColloDB::threads::shared;
 
 $module = $DiaColloDB::threads::shared::MODULE;
 
 if ($DiaColloDB::threads::shared::MODULE) {
   ##-- you can use the threads::shared API
   my ($var);
   share($var);
   lock($var);
   #... etc.
 }

DESCRIPTION

The DiaColloDB::threads::shared module attempts to load shared variable support for (pseudo)-threads from either threads/shared.pm or forks/shared.pm, depending on whether or not your perl has builtin thread support according to $Config{usethreads}. It also wraps the import() method of whatever module it actually loads, so it should work as a drop-in replacement for whatever threads::shared-like module you have available.

Gloabls

Variable: $MODULE

After using DiaColloDB::threads::shared, the variable $DiaColloDB::threads::shared::MODULE is set to the name of the module providing the underlying threads::shared implementation (either threads::shared or forks::shared), if any. Otherwise, it is set to the empty string.

AUTHOR

Bryan Jurish <moocow@cpan.org>

COPYRIGHT AND LICENSE

Copyright (C) 2020 by Bryan Jurish

This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.

SEE ALSO

DiaColloDB::threads(3pm), threads::shared(3pm), forks::shared(3pm), perl(1), ...

1 POD Error

The following errors were encountered while parsing the POD:

Around line 40:

alternative text 'threads/shared.pm' contains non-escaped | or /

alternative text 'forks/shared.pm' contains non-escaped | or /