Loading ...
Sorry, an error occurred while loading the content.

3567Re: [soaplite] can(method)

Expand Messages
  • Juan Jose Natera Abreu
    May 11, 2004
    • 0 Attachment
      Hi, how about this?

      man UNIVERSAL
      man perlobj

      'can' is a special method all objects in perl have, it's used to tell if that
      object has ('can' call) a particular method, I guess you can override it by
      simply defining your own:

      sub can {
      $self = shift;

      You probably don't want to do this, simply rename your acl check to something
      like 'can_do' or 'has_access_to' or whatever.


      PS. maybe I misunderstood what you were talking about it.

      On Tuesday 11 May 2004 07:07, Klaus Guenter wrote:
      > Hi, list!
      > I dont think, I'm the first to stumble over that, but where the heck
      > do I find the can() method. Lots of methods are generated on the fly,
      > AFAICS but no "can"
      > Background:
      > I would like to implement access control based on hosts/uid/.... and I dont
      > want to reinvent the wheel. I got the hint at perl monks to look for
      > "->can" and found a lot of "if $o->can(method) then do something" but no
      > definition/generation of this method.
      > Any hint is appreciated.
      > Confused,
      > Klaus
    • Show all 5 messages in this topic