Rebecca
- Website: re-becca.org
- About: I've been happily playing in Perl's playground since 1997, when I decided I really wanted to work with Unix and the Web, rather then DOS, where my previous work had been. Lately, my rate of publishing has code has increased a lot, in large part thanks to Github.
Recent Actions
-
Commented on SelfLoader and things I've learned writing/using a debugger
Rather then the eval, I'd use a closure: ... if (caller()) { # demo code section. my $ack = sub { $_[0] ? 'yep' : 'nope' }; ... $ack->(MyModule::does_this()) ... } The only time I'd use an eval or mucking...
-
Commented on A Simple Plack/DBI Example
Why are you quoting your class names? Are you afraid they might also be function names?...
-
Commented on AnyEvent::Capture - Synchronous calls of async APIS
Oh, I like that, thank you Aristotle...
-
Commented on AnyEvent::Capture - Synchronous calls of async APIS
@schmorp: Er yes, the bit about libraries could be put more clearly... I had my mind primarily application-local libraries where, well, let's not say blocking per se, but stopping to wait for some of our outstanding event listeners to trigger...
-
Posted AnyEvent::Capture - Synchronous calls of async APIS to for do while next
… -
Commented on AnyEvent::Capture - Synchronous calls of async APIS
@Joel— Huh, I’d never heard of that module (obviously). I’ll see if I can’t brainstorm a new name. @Paul— Yes, exactly. Huh, IO::Async is interesting, do you have a page or a post somewhere explaining how you’d like it to...
-
Commented on Extensible Maintainable Subroutines and Methods
Certainly with any subroutine taking a lot of arguments, that's the direction I go in, although I've never been one to do it universally. (Although I did recently write a network-level API that passes json objects around, which is the...
-
Posted Golfing for Gotchas to for do while next
I’ve been building a little stand alone command line tool lately, which led to me looking at using App::FatPacker to make a standalone, single-script download. This was going well until I tried to load Digest::Perl::MD5, which caused fatpacker to mysteriously crash with an undefined value.…
-
Posted Localizing Variables in Coroutines to for do while next
While I was browsing the CPAN the other day, I came across Coro::LocalScalar and I said to myself, oh, what a useful idea… it lets you localize globals to a thread. An important feature if you do anything in your thread with those…
-
Commented on Learning AnyEvent
I should add though, that for any complicated system I always mix in Coro with AnyEvent....
-
Commented on Learning AnyEvent
I liked POE a lot when I first started using it, but I've had a lot of bad experiences with maintaining large software projects written in POE, where I haven't had the same problem with AnyEvent....
-
Commented on Marpa and OO
Yeah, I've also wanted to be able to inherit and extend grammars to support different dialects of a language....
-
Commented on A lot of good tiny ideas
tail-recursion, seems to have been on the CPAN for two years anyway... http://search.cpan.org/perldoc?Sub::Call::Tail...
-
Posted ORMs and Their Alternatives to for do while next
While on the one hand, ORMs make up most of the published best practices for interfacing with databases, (see the success of DBIx::Class, and many other similar products), on the other hand, there is a certain amount of backlash against them,…
-
Commented on MOPing with Moose
Meta-information that inherits to subclasses, is applied with roles, etc? That would definitely be cleaner if that were the case....
-
Posted MOPing with Moose to for do while next
I’ve used Moose regularly now for a couple years, but really only so far as most people do, as a handy accessor generator and type checker. But my most recent project has called on me to delve, first into Roles, which are a lovely way to teach old classes new tricks, but I found I wanted…
-
Commented on $world->on( create => sub { say "Hello" } )
Additionally, if you just want to treat it like a normal role, you can just do: use Moose; with 'MooseX::Event::Role'; However, right now that leaves you without the has_event method-- you can call MooseX::Event::has_event( ... ) however, which is unfortunately,...
-
Commented on $world->on( create => sub { say "Hello" } )
Regarding the API-- much of my intent here *is* the concise API. However, if you want a more verbose one, it is (already) a Moose Role, and you can alias the events to any name you like. So I would...
- Posted $world->on( create => sub { say "Hello" } ) to for do while next
Comment Threads
-
Toby Inkster commented on
A Simple Plack/DBI Example
"it wanted a year"... I initially read that as a comment about how long it took to install DateTime. I thought you were being a little unfair... DateTime maths is hard.
Haha! Yes, DateTime wants a year. JSON is a better example.
-
Hercynium commented on
A Simple Plack/DBI Example
tobyink++! Nice implementation! I wouldn't have thought to use 'no thanks'. That's clever!
-
dpetrov commented on
A Simple Plack/DBI Example
tobyink++ really nice ;)
-
Sergey commented on
A Simple Plack/DBI Example
So if table cannot be created (lack of free space) - it will loop forever?
Why eval{} if you don't use RaiseError ? -
Toby Inkster commented on
A Simple Plack/DBI Example
Not forever. Until somebody provides some free space. :-)
About blogs.perl.org
blogs.perl.org is a common blogging platform for the Perl community. Written in Perl and offering the modern features you’ve come to expect in blog platforms, the site is run by Dave Cross and Aaron Crane, with a design donated by Six Apart, Ltd.