No Soup for You!

I was working on a new Drupal 6 module, and at least until things became more complex, I was writing it in a top-down manner: the .info file, the .install file, and was working on defining permissions via hook_perm().

It should have been very easy. I created the following:

function mymodule_perm() {
return array('permission for my module');

Then I cleared cache, just in case, and voilĂ ...nothing. The permission did not appear in user/permissions. To keep the story short, I'll skip the hair-pulling and jump right to the point where it occurred to me that I'd put the function in instead of mymodule.module, where it needs to be in order to be processed!

Add new comment


  • Allowed HTML tags: <a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd>
  • Missing filter. All text is removed