[ic] Error with Tag->data in actionmap after upgrade to Centos 7.4 mysql 5.7.21

Peter peter at pajamian.dhs.org
Sun Mar 11 18:13:13 UTC 2018


On 12/03/18 03:53, Andrew Baerg wrote:
> On 2018-03-11 03:46 AM, Peter wrote:
>> On 11/03/18 13:52, Andrew Baerg wrote:
>>> I don't think there is any way to use $Tag->data in an ActionMap 
>>> without AllowGlobal.
>> Ummm, see my previous responses where I gave three different ways
>> to make it work.
> 
> Right, sorry for not noting that.
> 
> But I don't see any way to use $Tag->data directly in an ActionMap
> sub defined on the catalog level the way Andy had without setting
> AllowGlobal for the catalog.

...because two of the three ways I mentioned involve doing just that and
should work.

The issue is that the data tag needs access to the db table and hence
the table itself must be pulled into the Safe container space before
this can happen.  Sometimes it works to do $Tag->perl('tablename'), but
since this code itself has to run in a Safe container it often times
fails (as it is for the OP).  When this doesn't work then it is required
to pull the tablename in outside of the safe space which is done by
running the perl tag as ITL either ahead of the code that includes
$Tag->data() or surrounding it as in these two examples:

AutoLoad <<EOA
[perl tablename][/perl]
EOA
Actionmap foo <<EOA
sub {
    $Tag->data(..);
    ...
}
EOA


...or...


Actionmap foo <<EOA
[perl tablename]
    $Tag->data(...);
    ...
[/perl]
EOA

...either one of the above should work with a catalog-level Actionmap.


Peter



More information about the interchange-users mailing list