Packages / openSUSE Leap 15.6 / Development/Libraries/Perl / perl-Contextual-Return

Package: perl-Contextual-Return (0.004014-bp156.3.1)

Create context-sensitive return values

Usually, when you need to create a subroutine that returns different values in different contexts (list, scalar, or void), you write something like: sub get_server_status { my ($server_ID) = @_; my %server_data = _ascertain_server_status($server_ID); if (wantarray()) { return @server_data{ qw(name uptime load users) }; } if (defined wantarray()) { return $server_data{load}; } if (!defined wantarray()) { carp 'Useless use of get_server_status() in void context'; return; } else { croak q{Bad context! No biscuit!}; } } That works okay, but the code could certainly be more readable. In its simplest usage, this module makes that code more readable by providing three subroutines--'LIST()', 'SCALAR()', 'VOID()'--that are true only when the current subroutine is called in the corresponding context: use Contextual::Return; sub get_server_status { my ($server_ID) = @_; my %server_data = _ascertain_server_status($server_ID); if (LIST) { return @server_data{ qw(name uptime load users) } } if (SCALAR) { return $server_data{load} } if (VOID) { print "$server_data{load}\n" } else { croak q{Bad context! No biscuit!} } }

Package information

Homepage
[http://search.cpan.org/dist/Contextual-Return/]
License
Artistic-1.0 or GPL-1.0+
Downstream package maintainer
Unknown: not reported in the indexed source
Source package
[perl-Contextual-Return]
Software project
[perl-Contextual-Return]

Versions and downloads for perl-Contextual-Return

Version / releaseArchitecture / repositoryPackage sizeInstalled sizeFilesPublisher repository artifact
0.004014-bp156.3.1leap-15.6 / ossnoarchopenSUSE Leap 15.6 · OSS · multi-architecture64 KiB159 KiBlist of filesperl-Contextual-Return-0.004014-bp156.3.1.noarch.rpm
About these downloads

Each row is recorded package-index metadata for one version, architecture, suite, and repository. Names, URLs, and sizes are source-reported; a link is a potentially mutable retrieval location, not an OpenFactory redistribution claim or proof that OpenFactory retained the artifact bytes.

Dependencies and recommendations for perl-Contextual-Return

  • dep: perl(:MODULE_COMPAT_5.26.1)

    Package not available

  • dep: perl(Want)

    Package not available

  • dep: perl(version)

    Package not available

Package file paths (10)

Paths come from the repository package-file index for the observed builds. They describe archive/package associations, not every file that will exist on a running system after maintainer scripts, alternatives, generated state, diversions, or installation choices.

  • /usr/lib/perl5/vendor_perl/5.26.1/Contextual
  • /usr/lib/perl5/vendor_perl/5.26.1/Contextual/Return
  • /usr/lib/perl5/vendor_perl/5.26.1/Contextual/Return/Failure.pm
  • /usr/lib/perl5/vendor_perl/5.26.1/Contextual/Return.pm
  • /usr/lib/perl5/vendor_perl/5.26.1/x86_64-linux-thread-multi
  • /usr/share/doc/packages/perl-Contextual-Return
  • /usr/share/doc/packages/perl-Contextual-Return/Changes
  • /usr/share/doc/packages/perl-Contextual-Return/README
  • /usr/share/man/man3/Contextual::Return.3pm.gz
  • /usr/share/man/man3/Contextual::Return::Failure.3pm.gz

Field source: openSUSE Leap 15.6 OSS

Known vulnerabilities

No matching advisories in the tracked sources.

Last synced:

[CVE catalog]

Checksums

Repository signatures authenticate metadata. Artifact hashing is recorded separately. Neither establishes package safety.

0.004014-bp156.3.1 / noarchObserved Sep 1, 2026sha512 97a7d27c3d5d…6c77bdceSource-reported digest

Metadata observed; artifact bytes were not independently fetched or hashed by this catalog import. The digest below is source-reported.

Source-reported digest (sha512): 97a7d27c3d5df89d99ffa125d0eef6405b23c6be885e4199d9766d114eab3756a707330c38ea9f5774ee2ebd58ed812679724c88f764ebe968d56ade6c77bdce

Field source: openSUSE Leap 15.6 OSS

Sources

  • Authoritative source; repository metadata signature verified

    Signature evidence

    leap-15-6-oss-multiarch:ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230

    Repository-signature verification record
    Signed-object SHA-256
    ca2653101b9afba6656aea529109ba0c0f1ca1a92aa8614e7c887fda5264c230
    Signer fingerprint
    AD485664E901B867051AB15F35A2F86E29B700A4
    Keyring revision
    opensuse-project-signing-key.asc
    SHA-256 b5745739ebfb95b25b8e810f9bcb847fe750ccda598bd85f02f0e974599a6d7e
    Tool and policy
    gpgv (GnuPG) 2.4.9
    openfactory-software-catalog-signature-v1
    Verification time
    Sep 1, 2026
    Repository metadata hash linkage
    Result
    Recorded as verified; digest details unavailable

Use this package

OpenFactory can boot this operating system in a browser VM, or start a build that includes the native package name from this record.