Skip Menu |

This queue is for tickets about the Bot-BasicBot CPAN distribution.

Report information
The Basics
Id: 70661
Status: new
Priority: 0/
Queue: Bot-BasicBot

People
Owner: Nobody in particular
Requestors: STANS [...] cpan.org
Cc: stan [...] schwertly.com
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.88
Fixed in: (no value)



CC: stan [...] schwertly.com
Subject: "arguments" parameter in forkit makes body not optional (documentation)
This "bug" is more of a request for clarity and may be a problem with me reading too literally. The sub referenced in "run" for forkit has the following block of text: "Bear in mind that the routine doesn't automatically get the text of the query - you'll need to pass it in arguments (see below) if you want to use it at all." Reading that both "body" and "arguments" were optional, I passed my string in an anonymous array to arguments (I'm passing a modified body string, so I figured it made more logical sense as an argument). I was confused as to why I wasn't getting the array in my subroutine until I checked the code. You need to shift the top of @_ before getting into arguments, or you'll get an undef value (body) returned when you try to grab it. body is conditionally optional, or at least needs to be handled in your sub if you plan on using arguments. Either noting this in the documentation, or completely leaving out $args->{body} if it's undefined would fix this bug. Like I said, I can definitely see this being either way. I hope I'm not being a hassle.