Danek Duvall wrote: > On Wed, Aug 20, 2008 at 05:21:27PM -0500, Shawn Walker wrote: > >> http://cr.opensolaris.org/~swalker/pkg-1730/ > > So why isn't this done in the fmri constructor?
I don't know -- that's where I wanted to put it, until I saw that we had the valid_new_fmri method already in catalog. I think it's odd that fmri doesn't throw an exception when it gets an invalid fmri. > Or at least be a method on the fmri, rather than a method in the misc > module? Putting the test in the constructor would slow down object > creation, and maybe not all parts of the system care, but it should at > least be an operation on an fmri object. I thought it would be useful to be able to check whether something was a valid pkg name without constructing an fmri. If you think it should be a @staticmethod of the fmri class -- I'm ok with that. I also agree with your concerns about putting the check in the fmri constructor. -- Shawn Walker _______________________________________________ pkg-discuss mailing list [email protected] http://mail.opensolaris.org/mailman/listinfo/pkg-discuss
