The following module was proposed for inclusion in the Module List:

  modid:       Contextual::Return::Wrapper
  DSLIP:       bdppp
  description: Modifies functionality based on wantarray
  userid:      TQISJIM (Jim Schueler)
  chapterid:   2 (Language_Extensions)
  communities:
    
http://blogs.perl.org/users/jim_schueler/2013/07/function-return-in-scalar-context.html
    , module-auth...@perl.org, perlmonks.com

  similar:
    Attributes::Context

  rationale:

    My module wraps an arbitrary user-defined function so that it
    responds differently based on the context established by querying
    wantarrray for context eg (array/scalar/void). In this case,
    wantarray is automatically implemented by the wrapper.

    Users who implement Conway's Contextual::Return need to define the
    functionality for each context definition. My module uses
    pre-defined functionality established by the calling function
    attributes. The value of this module is to standardize the
    implementation of common functionality.

    So this module is similar to Conway's in that the functionality is
    determined by the calling context. And different in that the
    functionality is pre-defined.

    This module uses a wrapper to achieve the same functionality as
    Conway's Contextual::Return. But since it does not literally wrap
    his module, the name Contextual::Return::Wrapper may be
    inappropriate. In that case, I will re-apply for Wantarray::Wrapper,
    which requires a new root namespace.

    The primary difference between my module and Ovid's
    Attributes::Context are the attribute signatures. I have also added
    a few additional pre-definitions.

  enteredby:   TQISJIM (Jim Schueler)
  enteredon:   Thu Aug  8 03:37:59 2013 UTC

The resulting entry would be:

Contextual::Return::
::Wrapper         bdppp Modifies functionality based on wantarray    TQISJIM


Thanks for registering,
-- 
The PAUSE

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=98c00000_9e45fdd13afe923f&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=98c00000_9e45fdd13afe923f&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
  
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Contextual%3A%3AReturn%3A%3AWrapper

Reply via email to