Writing Declarative Perl
At The Perl Conference in Washington DC, I'll be giving a talk on Modeling a Universe in Perl. For previous versions of this talk, people have asked for more information about how we model complex actions in a (mostly) declarative manner. For example, here's the code for purchasing a clone:
It's the Steps()
function which is our declarative code. As you might imagine, there are tons of actions which might require that you be in a particular area, or have credits removed from your wallet, so the Area
and Wallet
lines can be dropped into any Steps()
function anywhere throughout our code. But people want to know how this works. In reality, it's pretty simple.