It worked!

If you are viewing this the test perspective successfully loaded.

This perspective defines a javascript function which is associated with a button on the main toolbar.

The main toolbar and menubar in PUC is now interactive. You can check the state of any button/menu item and toggle enable/disable.

Sample Code

The round green button added to the toolbar when this perspective is active has an id of "test.perspective.test.overlay.button". To check the state invoke:
var enabled = window.top.mantle_isToolbarButtonEnabled("test.perspective.test.overlay.button");

To toggle set the state:
window.top.mantle_setToolbarButtonEnabled("test.perspective.test.overlay.button", !enabled);

Toolbar Interactivity

Click to state (enabled/disabled) state of PUC main toolbar button.
Click to PUC main toolbar button.
Click to PUC main toolbar button.

Menubar Interactivity

Click to state (enabled/disabled) state of PUC main menu item.
Click to PUC main menu item.
Click to PUC main menu item.