[Wellington-pm] Roundup of last night's meeting

Florent Mara florent.mara at nzregen.co.nz
Thu Oct 27 17:05:22 PDT 2016


Thank you Grant, your reply was the hint I was needed ( and the second
coffee is starting to kick in ... )
I was only looking at the original array prior to calling set().

My set() method is a wrapper around Statistics::R->set() which calls a
_quote() ( line 574
<https://metacpan.org/source/FANGLY/Statistics-R-0.34/lib/Statistics/R.pm>)
method on each element of the array thus modifying the original array and
messing with my test. Not sure it is good practice but it is implemented
that way and at least that is a mystery solved. Now lets make that test
pass ...


On Fri, Oct 28, 2016 at 12:36 PM, Grant McLean <grant at mclean.net.nz> wrote:

> On Fri, 2016-10-28 at 11:40 +1300, Florent Mara wrote:
> > Since I am here, maybe somebody could explain me what I am doing wrong
> > here:
> >
> > my $cust_levels = ['Inner Span', 'End Span'];
> > my $mirror = $object->set('array', $cust_levels); # Sets a mirroring
> variable in a different object.
> > is($mirror->[0], $cust_levels->[0], 'Got the expected array element');
> >
> > Results in
> > #   Failed test 'Got the expected array element'
> > #          got: 'Inner Span'
> > #     expected: '"Inner Span"'
>
> Wow, that is odd.  It seems to be telling us that somewhere in the
> course of doing its job, the set method successfully copied the values
> from $cust_levels and then corrupted the source data by adding double
> quotes.
>
> Be sure to let us know what it was when you work it out :-)
>
> Cheers
> Grant
>
>
> _______________________________________________
> Wellington-pm mailing list
> Wellington-pm at pm.org
> http://mail.pm.org/mailman/listinfo/wellington-pm
>



--
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.pm.org/pipermail/wellington-pm/attachments/20161028/a6fcb4cb/attachment.html>


More information about the Wellington-pm mailing list