Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

jonasbn (1153)

jonasbn
  reversethis-{gro.napc} {ta} {nbsanoj}
http://e-diot.dk/
AOL IM: BJonasN (Add Buddy, Send Message)

Perl Programmer located in Copenhagen, Denmark. Active member of Copenhagen Perl Mongers.

Author of:

  • Business::DK::CPR
  • Business::DK::CVR
  • Business::DK::PO
  • Business::OnlinePayment::CashCow
  • Date::Holidays
  • Date::Holidays::Abstract
  • Date::Holidays::Super
  • Date::Pregnancy
  • Games::Bingo
  • Games::Bingo::Bot
  • Games::Bingo::Print
  • Module::Info::File
  • Module::Template::Setup
  • Test::Timer

and maintainer of:

  • Tie::Tools
  • XML::Conf
  • Workflow

Journal of jonasbn (1153)

Wednesday June 25, 2003
03:52 PM

Oh what a day, what a happy crappy day

[ #13066 ]

I have been fighting all day with SOAP and VB.NET. I have read a lot of MSDN articles, without any luck, all in all I cannot get the web services to do as I want - and at the same time the tasks are pilling up and we are very busy.

It is fun to sit and play with the web services stuff, but I would like less stress and a few succesful experiences :-/

But know I am home to the REAL succes of the day, Games::Bingo::Bot is finished in the first version. Perl rocks. I had implemented the bot as a simple script containing all I needed, but I wanted to move the Games::Bingo related stuff into a separate module (class). So I started by moving it earlier this week, then I refactored the module to be a class and then everything stopped working :)

I had implemented the commands as normal subs and in order to keep everything neat I kept a list of references to these. I had never used code references in conjunction with OOP, but I implemented the same list of commands as an attribute in the Games::Bingo::Bot class and then I could still resolve the subs, which implement commands without mixing these up with the other subs (the constructor etc.)
But I could not get it to work, then it struck me, one of the old failures I used to make many years ago, was that I always forgot that the first parameter to a method was the object itself, so I ended up with this neat piece of code:


if (my $sub = $gbb->{'commands'}->{$msg}) {
        my ($type, $answer) = &$sub($gbb, $nick);

and it works perfectly.

So I wrote a bit of docs and I wanted to create the distribution of the Games::Bingo::Bot code. Then I found out I have really made a mess of the CVS file structure.

In order to have the namespace easily browsable the structure looks like this:


games dir
        bingo dir
                  games-bingo source
                  bot dir
                              games-bingo-bot source
                  print dir
                              games-bingo-print source

aso

This mean that the Makefiles trigger each other and everything is somewhat entangles, if the makefile could just keep to what is in the MANIFEST file, but apparently not.

Another annoying thing I have been fighting before is, after changing to UFS from HPFS+ I have all these annoying ._ files all of the filesystem and they interfere with the building proces...

ARGH!

This day has both been very good and really crappy... and tomorrow will probably be the same.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • So, when will a bingo bot show up in #perl? And what will it be called?
    • Well it is called bingobot :)

      it currently wants to run in a channel called #bingo, but that can be changed, later more easily when I get some configuration file going...

      Check CPAN, Games::Bingo::Bot, it should be indexed shortly.