logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

Sympa::Request - Requests for operation

Description

       Sympa::Request implements serializable object representing requests by users.

   Methods
       new ( [ $serialized, ] context => $that, action => $action, key => value, ... ] )
           Constructor.  Creates a new Sympa::Request object.

           Parameters:

           $serialized
               Serialized request.

           context => object
               Context.  Sympa::List object, Robot or '*'.

           action => $action
               Name of requested action.

           key => value, ...
               Metadata and attributes.

           Returns:

           A new instance of Sympa::Request, or undef, if something went wrong.

       new_from_tuples ( key => value, ... )
           Constructor.  OBSOLETED.  Creates Sympa::Request object from paired options.

       dup ( )
           Copyconstructor.  Gets deep copy of instance.

       to_string ( )
           Serializer.  Returns serialized data of object.

       cmd_line ( [ canonic => 1 ] )
           Instancemethod.  TBD.

       handler ( )
           Instancemethod.  Name of a subclass of Sympa::Request::Handler to process request.

       get_id ( )
           Instancemethod.  Gets unique identifier of instance.

   Contextandmetadata
       Context  and  metadata given to constructor are accessible as hash elements of object.  They are given by
       request spool.  See "Context and metadata" in Sympa::Spool::Auth for details.

   Attributes
       These are accessible as hash elements of objects.  There are attributes including:

       {custom_attribute}
           Custom attribute connected to requested action.

       {gecos}
           Display name of user sending request.

       {sender}
           E-mail of user who sent the request.

   Serialization
       Sympa::Request object includes number of slots as hash items: metadata, context and attributes.  Metadata
       including context are given by spool: See "Marshaling and unmarshaling metadata" in Sympa::Spool.

       Logically, objects are stored into physical spool as serializedform  and  deserialized  when  they  are
       fetched from spool.  Attributes are encoded in "X-Sympa-*:" pseudo-header fields.

       See also "Serialization" in Sympa::Message for example.

History

       Sympa::Request appeared on Sympa 6.2.10.

6.2.76                                             2025-02-12                             Sympa::Request(3Sympa)

Name

       Sympa::Request - Requests for operation

See Also

       Sympa::Request::Collection, Sympa::Request::Handler, Sympa::Request::Message, Sympa::Spool::Auth.

Synopsis

         use Sympa::Request;
         my $request = Sympa::Request->new($serialized, context => $list);
         my $request = Sympa::Request->new(context => $list, action => 'last');

See Also