in reply to Safe.pm, Barcode::DataMatrix, Can't locate object method "new" via package "Barcode::DataMatrix"
'Barcode::DataMatrix' is being treated as a function name. You could try:$safefuncs->share( 'Barcode::DataMatrix' ); $safefuncs->share_from('main', [ 'DataMatrix2d' ]);
From the docs:$safefuncs->share_from( 'Barcode::DataMatrix', \@safeops ); $safefuncs->share_from( 'main', [ 'DataMatrix2d' ]);
This shares the variable(s) in the argument list with the compartment... Each NAME must be the name of a non-lexical variable, typically with the leading type identifier included. A bareword is treated as a function name.share (NAME, ...)
This method is similar to share() but allows you to explicitly name the package that symbols should be shared from. The symbol names (including type characters) are supplied as an array reference.share_from (PACKAGE, ARRAYREF)
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Safe.pm, Barcode::DataMatrix, Can't locate object method "new" via package "Barcode::DataMatrix"
by Tharg (Scribe) on Jul 19, 2015 at 16:29 UTC | |
by tangent (Parson) on Jul 19, 2015 at 16:55 UTC | |
by Tharg (Scribe) on Jul 19, 2015 at 17:00 UTC |