Thanks for your reply. I made that line up and you're right - it would lead to an array reference. Sadly though, this wasn't the problem. Both of the following snippets don't work, they both return 0:
if ( $body =~ /^!seto\s*$/ ) { my @order = ("pea","plum","banana"); $self->set("fruit_order"=>@order); my @o = @{ $self->get("fruit_order") || [] }; return @o; } if ( $body =~ /^!seto\s*$/ ) { my @order = ("pea","plum","banana"); $self->set("fruit_order"=>\@order); my @o = @{ $self->get("fruit_order") || [] }; return @o; }
As I digged a bit deeper into the according modules I couldn't find any example of an array being stored and retreived. Could it be possible that storing arrays is not supported by the module?
In reply to Re^2: How to store an array in the store of Bot::BasicBot::Pluggable::Module?
by brengo
in thread How to store an array in the store of Bot::BasicBot::Pluggable::Module?
by brengo
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |