Bugzilla->instance and friends

Christopher Hicks chicks at chicks.net
Sun Feb 2 17:35:23 UTC 2003


On Sun, 2 Feb 2003, Bradley Baetz wrote:
> > > To get a template, you then:
> > >
> > > Bugzilla::Template->instance
> > 
> > Why not Bugzilla->template ?
> 
> Because then the Bugzilla class is the central point of access. Thats
> what we have now, but once the template accessor sub becomes:
> 
> my $_template;
> sub template {
>   $_template ||= new Bugzilla::Template();
>   return $_template;
> }
> 
> theres not much advantage to having it in the central package

I'd like to place at least one vote for the fact that Bugzilla->template 
looks a lot cleaner than Bugzilla::Template->instance.

-- 
</chris>

"Never offend people with style when you can offend them with substance."
		- Sam Brown 




More information about the developers mailing list