GOTOU Yuuzou wrote:
>In message <3C9871D3.9060405@imperitek.com>,
> `David Corbin <dcorbin@imperitek.com>' wrote:
>
>>To be useful, my handler needs a bunch of options. I would rather do
>>like this
>> h = MyHandler.new(coreStuff")
>> h.addFunnyOption ("foo","bar")
>> h.addFunnyOption ("alpha","gamma")
>> h.setZoption("gamma")
>> mount ("/z",h)
>>than do this
>> mount("/z",MyHandler {"CoreStuff"=> "coreStuff",
>>"FunnyOptions"=>[["alpha","gamma"],["foo","bar"]],"Zoption"=>"gamma"})
>>
>
>How about this way?
>
> app = YourApp.new("coreStuff")
> app.addFunnyOption("foo","bar")
> app.addFunnyOption("alpha","gamma")
> app.setZoption("gamma")
> mount("/z", YourHandler, app)
>
It just seems like a smell to me. Those characteristics are part of the
handler object. Having to creat another object just to hold them seems
inappropriate to me. (Though yes, technically, it would work, and
probably be better than the my second solution, it's not as good as my
first solution).
>
>--
>gotoyuzo
>
>