POE can do everything, POE6 will do more or err....

triv on 2002-08-10T06:25:17

I had the moment of light the other day. I was playing around with the project and Casey and myself are currently working on, an asynchronous credit card processor in POE. Clouds parted, trumpets sang, and POE suddenly made sense to me. Sessions are like threads, components are like little magic boxes, and the kernel is god of this little world. Good fun.

The processor was pretty simple, we just hacked up Buisness::OnlinePayment::AuthorizeNet to use LWP instead of Net::SSLeay, that way we can pass a HTTP::Request object that Buisness::OnlinePayment::AuthorizeNet generates to POE::Component::Client::HTTP and then send the HTTP::Response object back to Buisness::OnlinePayment::AuthorizeNet. CPAN baby, CPAN! Name another language where you can build an asynchronous creditcard processor in a day!

I also noticed that // is not feeling well in bleedperl. Due to the nature of the perl syntax, the tokenizer doesn't ways know if you mean // in the err sense, or // in the regex sense. This means that my $foo = shift // 0; does not work. I personally think it is fine for shift < 5 not to work, but a large number of people are going to expect that they can just use // like ||.

The thread on p5p regarding this has stopped with Larry saying that they just avoiding the problem by making // only the err operator in perl6, it is not a valid regex.