2009/7/28 John W. Krahn <jwkr...@shaw.ca>: > Dermot wrote: >> >> 2009/7/28 John W. Krahn <jwkr...@shaw.ca>: >> >> Thanx for gettig back to me. >> >>> Which error? Copy and paste the error message you are receiving. >> >> Opps sorry. Here you are. Every time I start the httpd I get >> > > That message means that you have defined two addItemsToBasket subroutines > and also two addItemToBasket subroutines in the current package.
I can't confirm this from where I am right now but I have a sneaky feeling that this might be the case. The file was in subversion and was reported as conflicted when I updated. I made some edits but I wonder if there are multiple instances of those routines. > You could be importing a module before MyApp::Basket that has these > subroutines or they could be defined in the main package. > > Why are you reading from your program file while importing modules? Sorry John, I don't understand won't you mean by "reading from your program file while importing modules". > How about something like this: > > sub addItemsToBasket { > my $bid = shift; > my $items = ref $_[0] ? $_[0] : \...@_; > Perhaps you can expand, if $_[0] was a scalar wouldn't that get assigned to $items? I venture this but only because I suspect I am missing something in your example: my $items = ( ref($_[0]) eq 'ARRAY' ) ? $_[0] : \...@_; Thanx for your help, Dp. -- To unsubscribe, e-mail: beginners-unsubscr...@perl.org For additional commands, e-mail: beginners-h...@perl.org http://learn.perl.org/