[boulder.pm] Catching incorrect subroutine calls

Rob Nagler nagler at bivio.com
Fri Aug 4 07:31:44 CDT 2000


> Not much for static subroutines. However, what if you're actually writing
> _interesting_ Perl and you're dynamically defining subroutines, or eval'ing
> code that you've constructed with strings that were originally Unicode
> cyrillic that you've turned into Perl with a regular expression?

We try to avoid cyrillic, but we do write lots of dynamic code.  :-)  However,
since we always use the '->' form of calling, we know which object/class and method
was not found.  

> Spectacular. It tells us what subroutine doesn't exist, and what line it
> is on. What more could you possibly want?

If you could do the same trick to tell us which variable was undefined
when perl complains "use of undefined value", you'd get more than a Dr. Pepper
from bivio. $-)

One thing we've found to be really useful is to wrap "die" and "warn" to
evaluate their arguments intelligently, i.e. if something is "undef", print
undef, not another warning. :-)  In addition, we can control whether stack
traces are produced or not from a configuration file or the command line.
Long arguments are truncated.  Refences are unwrapped.  And so on.

I've attached a tar of some classes we developed.  We'll be releasing our full
neo-classical OLTP infrastructure in the Fall.  I didn't fix these up.  If you
don't understand how to use them, send an email to this list or to me personally
and I'll post an example.  There are a couple of test programs.

The other bits, e.g. die management and web infrastructure, are undergoing review
this week and next.  We're spending a chunk of August to clean them up for 
public use. 

The whole thing will be GPL'd.  I didn't GPL the stuff in the tar, because it
isn't ready for "release".  If you really want to use them, let me know and we'll
GPL the modules.

> There hasn't been a meeting in awhile, right? Lets see. I'd be up for
> sitting around in some public place in two or three weeks. I'm not keen
> on the entire meeting-in-a-restraunt since I'm too cheap to eat out.
> Maybe wait for school to start? We could stick up signs in the engineering
> center on campus then.

I'd be willing to sponsor the meeting place and some pizzas (sorry, ABOs only :)
and soda.  I just can't afford the time to organize the meeting.  Send me an
email if you want to organize and we can figure out a budget.

Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bivio.tgz
Type: application/octet-stream
Size: 12531 bytes
Desc: not available
Url : http://mail.pm.org/archives/boulder-pm/attachments/20000804/8163a2a0/Bivio.obj


More information about the Boulder-pm mailing list