[Israel.pm] Testing problem
Thomas Maier
Thomas.Maier at monosphere.com
Mon Jan 5 07:12:23 PST 2004
And this is what I intend :). But I think,after all the 'echo' way is
better in this case.
Thanks Jason.
> Obviously, you can make $command a file-scope variable, or member data
> of $self, if you prefer, and change its setting in your test method
> (perhaps using local).
>
> Or you can write a fake open method, which will behave differently
> whether or not you're in test mode.
>
> But ultimately you need a way to run method without calling the
command,
> and that means being able to configure method externally. Whether you
do
> that by an argument or a variable etc. is up to you. Example:
>
> sub test {
> ....
> local $self->{COMMAND} = "test_command";
> $self->method(@param);
> }
>
>
> Regards,
>
> Jason Elbaum
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://www.perl.org.il/mailman/listinfo/perl
>
> YAPC::Israel::2004
> http://www.perl.org.il/YAPC/2004/
More information about the Perl
mailing list