I heart state machines. Device::Ericsson::AccessoryMenu is one now, which is groovy, as it doesn't lock people into my runloop. This is partly because I could, but also because I imagine there's a fair chance that the user already has a main runloop, like maybe the Tk one.