Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

Re: Strategy Handles

by Anonymous Monk
on Jan 04, 2006 at 13:38 UTC ( #520895=note: print w/replies, xml ) Need Help??

in reply to Strategy Handles

One of the nice aspects of this technique is that it is run-time dynamic: you can reassign (or re-bless) the strategy object ($output_strategy) at any time, to select a different strategy.
Instead of re-blessing, you should use a different strategy object. What you call strategy is the View in Module-View-Controller pattern.

Replies are listed 'Best First'.
Re^2: Strategy Handles
by jdporter (Canon) on Jan 04, 2006 at 19:41 UTC
    Instead of re-blessing, you should ...

    I never said one should rebless. My meditation illustrates a technique using inheritance tree twiddling, not reblessing. But TIMTWOTDI. I mentioned re-blessing parenthetically because it's another way to achieve the same result, and might be preferable for some people or in some circumstances.

    What you call strategy is the View in Module-View-Controller pattern.

    Only in the example I gave. Strategies can be used anywhere in an architecture.

    We're building the house of the future together.

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://520895]
[Corion]: tye: Hmm - you mean what who am i outputs?
[Corion]: (that should be getlogin()? )
[Corion]: (which apparently even is a Perl function, I didn't know that, so thank you for making me see that ;) )
[Corion]: Yeah, I just did su -; perl -wle "print getlogin" and it still printed corion

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2017-06-23 18:45 GMT
Find Nodes?
    Voting Booth?
    How many monitors do you use while coding?

    Results (554 votes). Check out past polls.