Avoid global variables. Prefer instance or class variables instead. It violates the Extension Warehouse guidelines to use globals.

In this case it's common to use the `file_loaded` function:

```
unless file_loaded(__FILE__)
  # Menu and toolbar stuff here...
  file_loaded(__FILE__)
end
```