>>> Sorry, I'm not sure I'm setting @INC right. I'm installing the
>>> dependencies via a custom target path
>>> cpanm -nL ./build JSON
>>> and setting
>>> use lib qw(./build/lib/perl5/);
>>>
>>> Not sure this helps:
>>>
>>> $ diff -r implementations/Perl_JSON-Path/build
>>> implementations/Perl_JSON-Path/build_alpine
>>> diff -r implementations/Perl_JSON-Path/build/.ninja_log
>>> implementations/Perl_JSON-Path/build_alpine/.ninja_log
>>> 2,3c2,3
>>> < 0 208 1579045735497619436 implementations/Perl_JSON-Path/build/cpanm
>>> 510b975a90dcad89
>>> < 208 16364 1579045751659110162
>>> implementations/Perl_JSON-Path/build/cpan_installed 525f0d1d995f1bc2
>>> ---
>>> implementations/Perl_JSON-Path/build/cpan_installed 525f0d1d995f1bc2
>>> Only in implementations/Perl_JSON-Path/build: bin
>>> Only in implementations/Perl_JSON-Path/build/lib/perl5:
>>> darwin-thread-multi-2level
>>> Only in implementations/Perl_JSON-Path/build_alpine/lib/perl5:
>>> x86_64-linux-thread-multi
>>> $ ls implementations/Perl_JSON-Path/build/bin
>>> cpanel_json_xs
>>>
>>>
>>>
>>> Am Mi., 15. Jan. 2020 um 00:40 Uhr schrieb Kit Peters via RT <
>>> bug-JSON-Path@rt.cpan.org>:
>>>
>>>> <URL:
https://rt.cpan.org/Ticket/Display.html?id=131456 >
>>>>
>>>> Curiouser and curiouser... (i.e. "Das war unerwartet") Both systems are
>>>> using the same version of JSON::PP. I can't imagine why one system would
>>>> treat "42" as valid and another would not; it should be the same code on
>>>> both.
>>>>
>>>> On Tue, Jan 14, 2020 at 5:28 PM Christoph Burgmer via RT <
>>>> bug-JSON-Path@rt.cpan.org> wrote:
>>>>
>>>> explains
>>>> > the recent painful experience with Objective C.
>>>> >
>>>> > Output for your query on OS X:
>>>> >
>>>> > $ for MOD in 'Cpanel::JSON::XS' 'JSON::XS' 'JSON::PP' ; do perl
>>>> -M$MOD -e
>>>> > "print qq{$MOD \$$MOD::VERSION\n}" ; done
>>>> > Can't locate Cpanel/JSON/XS.pm in @INC (you may need to install the
>>>> > Cpanel::JSON::XS module) (@INC contains:
>>>> >
>>>> >
>>>> /usr/local/Cellar/perl/5.30.1/lib/perl5/site_perl/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/Cellar/perl/5.30.1/lib/perl5/site_perl/5.30.1
>>>> >
>>>> /usr/local/Cellar/perl/5.30.1/lib/perl5/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/Cellar/perl/5.30.1/lib/perl5/5.30.1
>>>> > /usr/local/lib/perl5/site_perl/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/lib/perl5/site_perl/5.30.1).
>>>> > BEGIN failed--compilation aborted.
>>>> > Can't locate JSON/XS.pm in @INC (you may need to install the JSON::XS
>>>> > module) (@INC contains:
>>>> >
>>>> >
>>>> /usr/local/Cellar/perl/5.30.1/lib/perl5/site_perl/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/Cellar/perl/5.30.1/lib/perl5/site_perl/5.30.1
>>>> >
>>>> /usr/local/Cellar/perl/5.30.1/lib/perl5/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/Cellar/perl/5.30.1/lib/perl5/5.30.1
>>>> > /usr/local/lib/perl5/site_perl/5.30.1/darwin-thread-multi-2level
>>>> > /usr/local/lib/perl5/site_perl/5.30.1).
>>>> > BEGIN failed--compilation aborted.
>>>> > JSON::PP 4.02
>>>> >
>>>> > Alpine
>>>> >
>>>> > $ docker run --rm -it alpine:3.11 sh
>>>> > / # apk add perl
>>>> > [...]
>>>> > / # for MOD in 'Cpanel::JSON::XS' 'JSON::XS' 'JSON::PP' ; do perl
>>>> -M$MOD -e
>>>> > "print qq{$MOD \$$MOD::VERSION\n}" ; done
>>>> > Can't locate Cpanel/JSON/XS.pm in @INC (you may need to install the
>>>> > Cpanel::JSON::XS module) (@INC contains:
>>>> /usr/local/lib/perl5/site_perl
>>>> > /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl
>>>> > /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl
>>>> > /usr/share/perl5/core_perl).
>>>> > BEGIN failed--compilation aborted.
>>>> > Can't locate JSON/XS.pm in @INC (you may need to install the JSON::XS
>>>> > module) (@INC contains: /usr/local/lib/perl5/site_perl
>>>> > /usr/local/share/perl5/site_perl /usr/lib/perl5/vendor_perl
>>>> > /usr/share/perl5/vendor_perl /usr/lib/perl5/core_perl
>>>> > /usr/share/perl5/core_perl).
>>>> > BEGIN failed--compilation aborted.
>>>> > JSON::PP 4.02
>>>> >
>>>> > Am Di., 14. Jan. 2020 um 19:13 Uhr schrieb Kit Peters via RT <
>>>> > bug-JSON-Path@rt.cpan.org>:
>>>> >
>>>> about is
>>>> > > essentially that one system treats the string "42" (minus quotes) as
>>>> > valid
>>>> > > JSON, and the other does not, even though the Perl versions are
>>>> > identical.
>>>> > > My reply will assume that to be the case.
>>>> > >
>>>> > > Perl does not natively decode/encode JSON. Instead JSON support is
>>>> > provided
>>>> > > by a number of third party modules. In the case of JSON::Path, the
>>>> JSON
>>>> > > encoder used is JSON::MaybeXS (
>>>>
https://metacpan.org/pod/JSON::MaybeXS).
>>>> > > Per
>>>> > > the documentation, this will use Cpanel::JSON::XS if available,
>>>> fall back
>>>> > > to JSON::XS if the former is not available, and finally fall back to
>>>> > > JSON::PP. So JSON on two different systems could be handled by any
>>>> of
>>>> > these
>>>> > > three modules. Furthermore, until the introduction of ECMA-404 in
>>>> 2014,
>>>> > > "42" was *not* valid JSON. See
>>>> > >
>>>>
https://www.mattlunn.me.uk/blog/2014/01/what-is-the-minimum-valid-json/
>>>> > > for
>>>> > > more discussion on this topic.
>>>> > >
>>>> > > I'm a bit surprised, though, that the system Perl on OSX is so old.
>>>> Let's
>>>> > > investigate this further. On both systems, execute the following in
>>>> Bash
>>>> > > and send me the results:
>>>> > >
>>>> > > for MOD in 'Cpanel::JSON::XS' 'JSON::XS' 'JSON::PP' ; do perl
>>>> -M$MOD -e
>>>> > > "print qq{$MOD \$$MOD::VERSION\n}" ; done
>>>> > >
>>>> > >
>>>> > > On Tue, Jan 14, 2020 at 1:32 AM Christoph Burgmer via RT <
>>>> > > bug-JSON-Path@rt.cpan.org> wrote:
>>>> > >
>>>> > > > Tue Jan 14 02:32:04 2020: Request 131456 was acted upon.
>>>> > > > Transaction: Ticket created by christoph.burgmer@gmail.com
>>>> > > > Queue: JSON-Path
>>>> > > > Subject: Non deterministic result for $..* on scalar value
>>>> > > > Broken in: (no value)
>>>> > > > Severity: (no value)
>>>> > > > Owner: Nobody
>>>> > > > Requestors: christoph.burgmer@gmail.com
>>>> > > > Status: new
>>>> > > > Ticket <URL:
https://rt.cpan.org/Ticket/Display.html?id=131456 >
>>>> > > >
>>>> > > >
>>>> > > > It seems a recent bump in Alpine 3.11 from 3.10 has changed the
>>>> Perl
>>>> > > > version from
>>>> > > > This is perl 5, version 28, subversion 2 (v5.28.2)
>>>> > > > to
>>>> > > > This is perl 5, version 30, subversion 1 (v5.30.1)
>>>> > > > and also changed the response from JSON::Path for the edge case
>>>> of $..*
>>>> > > run
>>>> > > > on a document of the number 42 from an error response to the
>>>> result of
>>>> > an
>>>> > > > empty array.
>>>> > > >
>>>> > > > However on OS X with the same newer Perl version the previous
>>>> error
>>>> > > > response can still be seen:
>>>> > > >
>>>> > > > $ echo 42 | perl main.pl '$..*'
>>>> > > > Unable to decode 42 as JSON: malformed JSON string, neither tag,
>>>> array,
>>>> > > > object, number, string or atom, at character offset 0 (before
>>>> "(end of
>>>> > > > string)") at build/lib/perl5/JSON/Path/Evaluator.pm line 81,
>>>> <STDIN>
>>>> > line
>>>> > > > 1.
>>>> > > > at build/lib/perl5/JSON/Path/Evaluator.pm line 79.
>>>> > > > $ perl --version
>>>> > > >
>>>> > > > This is perl 5, version 30, subversion 1 (v5.30.1) built for
>>>> > > > darwin-thread-multi-2level
>>>> > > > [...]
>>>> > > > $ uname -s
>>>> > > > Darwin
>>>> > > >
>>>> > > >
>>>> > > > vs.
>>>> > > >
>>>> > > >
>>>> > > > $ docker run --rm -it -v "$(pwd):/mydir" alpine:3.11 sh
>>>> > > > / # apk add perl
>>>> > > > fetch
>>>> > > >
>>>>
http://dl-cdn.alpinelinux.org/alpine/v3.11/main/x86_64/APKINDEX.tar.gz
>>>> > > > fetch
>>>> > > >
>>>> > >
>>>> >
>>>>
http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz
>>>> > > > (1/2
>>>> > > > <
>>>> > >
>>>> >
>>>>
http://dl-cdn.alpinelinux.org/alpine/v3.11/community/x86_64/APKINDEX.tar.gz(1/2
>>>> > > >)
>>>> > > > Installing libbz2 (1.0.8-r1)
>>>> > > > (2/2) Installing perl (5.30.1-r0)
>>>> > > > Executing busybox-1.31.1-r8.trigger
>>>> > > > OK: 42 MiB in 16 packages
>>>> > > > / # cd mydir/
>>>> > > > /mydir # echo 42 | perl main.pl '$..*'
>>>> > > > []
>>>> > > > /mydir # perl --version
>>>> > > >
>>>> > > > This is perl 5, version 30, subversion 1 (v5.30.1) built for
>>>> > > > x86_64-linux-thread-multi
>>>> > > > [...]
>>>> > > >
>>>> > > >
>>>> > > > This currently makes it hard to reproduce the same results for the
>>>> > > > json-path-comparison across the Docker and native build (at least
>>>> on OS
>>>> > > X).
>>>> > > > I would be grateful for any pointers into why the behaviour would
>>>> be
>>>> > > > different.
>>>> > > >
>>>> > > > Script is here:
>>>> > > >
>>>> > > >
>>>> > >
>>>> >
>>>>
https://github.com/cburgmer/json-path-comparison/blob/master/implementations/Perl_JSON-Path/main.pl
>>>> > >
>>>> > > --
>>>> > > Kit Peters, W0KEH
>>>> > > GPG public key fingerpint: D4FF AA62 AFEA 83D6 CC98 ACE5 6FAE 7E74
>>>> 7F56
>>>> > > ED1D
>>>> > > Hello to any and all NSA, DEA, or other government or non-government
>>>> > agents
>>>> > > reading this email. Tell me about your life; I'll tell you about
>>>> mine.
>>>> > >
>>>> > >
>>>> >
>>>> >
>>>>
>>>> --
>>>> Kit Peters, W0KEH
>>>> GPG public key fingerpint: D4FF AA62 AFEA 83D6 CC98 ACE5 6FAE 7E74 7F56
>>>> ED1D
>>>> Hello to any and all NSA, DEA, or other government or non-government
>>>> agents
>>>> reading this email. Tell me about your life; I'll tell you about mine.
>>>>
>>>>