I am working on a little Perl module and for some reason I had the test driver script that was using my new module call one of the functions that I thought would be private, and it was successful. I was surprised, so I started searching google and I couldn't really find any documentation on how to make private functions in Perl modules....
Hi!
I’m having a mocking problem. I know only public methods should be mocked. But what do I do when a private method is called in a public method, and this private method is getting data from a file? I want to mock this private method so I could go on in with the test of the public method.
I could make this public to make the test wor...
So I thought this should be easy, but, I'm n00bing out here and failing epicly (as they say on teh interwebz).
So here's my code:
function xy() {
$array['var1'] = x;
$array['var2'] = y;
echo $this->_z;
}
function _z($array) {
$xy = $x.$y;
return $xy;
}
So, why doesn't that seemingly simple code work? I know with views you ...