On Thu Jul 27 14:21:01 2017, JPIERCE wrote:
Show quoted text> On Thu Jul 27 13:26:13 2017, REHSACK wrote:
>
> Not sure why the tests are separate,
Because they're exactly the same tests for List::MoreUtils and List::MoreUtils::XS. It's easier to find regressions in one of them sharing the tests.
Show quoted text> but after working my way through
> the not explicitly listed requirements for the module
> (Config::AutoConf, File::Find::Rule, Test::WriteVariants)
Building from repository requires having developer dependencies installed. See MAINTAINER.md ;)
But I expected rather you read the tests for proving the API ;)
Show quoted text> I get the following when I run inline/mode.pm
You have to run t/xs/mode.t (again: see MAINTAINER.md)
Show quoted text> Array found where operator expected at inline/mode.pm line 15, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 18, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 27, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 30, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 39, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 45, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 364, at end
> of line
> (Missing operator before ?)
> Array found where operator expected at inline/mode.pm line 368, at end
> of line
> (Missing operator before ?)
> syntax error at inline/mode.pm line 15, near "mode @lorem"
> syntax error at inline/mode.pm line 18, near "mode @lorem"
> syntax error at inline/mode.pm line 27, near "mode @probes"
> syntax error at inline/mode.pm line 30, near "mode @probes"
> syntax error at inline/mode.pm line 39, near "mode @probes"
> syntax error at inline/mode.pm line 45, near "mode @probes"
> syntax error at inline/mode.pm line 352, near "mode values"
> syntax error at inline/mode.pm line 357, near "mode values"
> syntax error at inline/mode.pm line 364, near "mode @probes"
> syntax error at inline/mode.pm line 368, near "mode @probes"
> inline/mode.pm has too many errors.
>
> This is perl 5, version 18, subversion 1 (v5.18.1) built for i686-
> linux
>
> Copyright 1987-2013, Larry Wall
>
> And I got the following warning when building the XS
>
> WARNING: MAGICXS is not a known parameter.
> 'MAGICXS' is not a known MakeMaker parameter name.
You'd need a more recent ExtUtils::MakeMaker to get rid of the warning. But it doesn't affect the build.
Show quoted text> I also read through the source and am not sure I understand the
> results mode is returning. Why does mode(@probes)=7 in scalar context
> and mode( values %radio_ukw_nrw)=14 in scalar context?
In scalar context, it's impossible to support multimodal results, thus the only reasonable value is the highest occurance.
Show quoted text> For that
> matter, it seems odd that it returns both WDR 5 (N=20) and WDR Eins
> Live (N=21) in list context... let alone give the result with the
> smaller number of occurrences first?
They're both 14 times in the list - not 20 nor 21 times ;)
In doubt, use occurances or frequency function to visualize ;)
Cheers,
Jens