I think the final design makes the most sense. It separates the functionality for deciding which handler to use from writing out the object.
Another way to handle it is store the state in the producer. Then have separate methods to fetch the mime_type and to write out the document.
$producer->start(@args); my $type = $producer->mime_type(); $product->generate();
In reply to Re: A question of design
by iburrell
in thread A question of design
by hanenkamp
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |