Re: When and how to throw exceptions?

2010-04-08 Thread Ovid
--- On Fri, 9/4/10, Aristotle Pagaltzis wrote: > From: Aristotle Pagaltzis > Why? > > I guess that could be addressed by allowing a hash of > formats and > then offering the throwing site to pick one of them by > setting > a special field. > > The key here is that you want to avoid a situatio

Re: Bundling SWIG-generated modules

2010-04-08 Thread Randy Kobes
On Thu, Apr 8, 2010 at 7:31 PM, Bill Moseley wrote: > At times we must make do with what we have: > I'm working with a team of C++ programmers.  To provide Perl access to their > code they are using SWIG, which produces a .pm and a (big fat) .so file. >  The question is how to turn this into a dis

Re: When and how to throw exceptions?

2010-04-08 Thread Aristotle Pagaltzis
* Lutz Gehlen [2010-04-09 01:55]: > I think that an own class for each message might be a bit of an > overkill. Why? I guess that could be addressed by allowing a hash of formats and then offering the throwing site to pick one of them by setting a special field. The key here is that you want to

Bundling SWIG-generated modules

2010-04-08 Thread Bill Moseley
At times we must make do with what we have: I'm working with a team of C++ programmers. To provide Perl access to their code they are using SWIG, which produces a .pm and a (big fat) .so file. The question is how to turn this into a distribution that can be installed in the correct place. Targe

Re: When and how to throw exceptions?

2010-04-08 Thread Lutz Gehlen
Hi Ovid, On Wed, Apr 07, 2010 at 12:04:08AM -0700, Ovid wrote: > --- On Wed, 7/4/10, Lutz Gehlen wrote: > > What I need a central place for is the definition of the > > actual > > error messages. With my module Exception::EasyThrow, I can > > write at > > the beginning of my module: > > > > us

Re: When and how to throw exceptions?

2010-04-08 Thread Aristotle Pagaltzis
* Ovid [2010-04-07 09:05]: > Presumably the format should try to determine the number of > conversions in the format and perhaps the alias could generate > a sub with a corresponding prototype like 'sub > throw_io_read($$)'. That might give you a touch of compile-time > safety. Haven't really thou