New version in progress - Net::Jabber::Bot

7 views
Skip to first unread message

Todd Rinaldo

unread,
Sep 24, 2008, 12:52:00 PM9/24/08
to perl-net-...@googlegroups.com
I've just converted NJB to Moose but have not released onto CPAN. My
conversion process has revealed some lacking areas in testing. Also I
need to get the TLS thing working with gmail (and my own jabber
server). If anyone wants to take a look at the changes, they're
available on google code in the trunk. I'm going with 2.1.0 as the new
version.

http://code.google.com/p/perl-net-jabber-bot/

Todd

clwaters

unread,
Sep 25, 2008, 11:58:55 AM9/25/08
to perl-net-jabber-bot
Is there anything significant about it's usage that has changed?

Todd Rinaldo

unread,
Sep 25, 2008, 12:10:39 PM9/25/08
to perl-net-...@googlegroups.com
I'm the major change is that the options have changed when creating
the object. I'm having trouble standardizing the syntax to make sense.

Changes:
1. Moose has different new. You pass in a hash, not a hash ref:
Do this: NJB->new(value1 => "djd", value2 => "sss");
instead of: NJB->new({value1 => "djd", value2 => "sss"});

2. Changed values used to pass in callback functions. Now called:
message_function, background_function. I'm open to suggestions on
this. Look at the module for all the "has" variables. Anything on that
list is open season to pass in via new. I need to update
examples/docs.

3. Using Moose, so bad pass in to new will result in a die signal. If
you want it to die gracefully, you'll have to do:
eval {NJB->new(...)};
if($@) {
React to bad event here.
}

All of these changes are to get me out Class::Std, which just was
never adopted and is somewhat abandoned in favor of Moose.

Again, all of this is very much pre-release. I garuntuee nothing at
the moment. I'm very interested in input from you guys who are using
the product.

Thanks,

Todd

Robert Boone

unread,
Sep 25, 2008, 12:44:10 PM9/25/08
to perl-net-...@googlegroups.com
Moose constructors will take a hash or hash ref...

> --~--~---------~--~----~------------~-------~--~----~
> You received this message because you are subscribed to the Google
> Groups "perl-net-jabber-bot" group.
> To post to this group, send email to perl-net-...@googlegroups.com
> To unsubscribe from this group, send email to perl-net-jabber...@googlegroups.com
> For more options, visit this group at http://groups.google.com/group/perl-net-jabber-bot?hl=en
> -~----------~----~----~----~------~----~------~--~---
>

Todd Rinaldo

unread,
Sep 25, 2008, 2:29:26 PM9/25/08
to perl-net-...@googlegroups.com
Cool! No change then!

--
Todd Rinaldo
to...@null.net

Reply all
Reply to author
Forward
0 new messages