Linux workstation

openSUSE Leap 16.0 native package

perl-Switch

A switch statement for Perl, do not use if you can use given/when

Packages / openSUSE Leap 16.0 / Development/Libraries/Perl / perl-Switch

[Source: perl-Switch]

Package: perl-Switch (2.17-160000.2.2)

[Project overview: perl-Switch]

External Resources:

Homepage: [search.cpan.org]

A switch statement for Perl, do not use if you can use given/when

The Switch.pm module implements a generalized case mechanism that covers most (but not all) of the numerous possible combinations of switch and case values described above. The module augments the standard Perl syntax with two new control statements: 'switch' and 'case'. The 'switch' statement takes a single scalar argument of any type, specified in parentheses. 'switch' stores this value as the current switch value in a (localized) control variable. The value is followed by a block which may contain one or more Perl statements (including the 'case' statement described below). The block is unconditionally executed once the switch value has been cached. A 'case' statement takes a single scalar argument (in mandatory parentheses if it's a variable; otherwise the parens are optional) and selects the appropriate type of matching between that argument and the current switch value. The type of matching used is determined by the respective types of the switch value and the 'case' argument, as specified in Table 1. If the match is successful, the mandatory block associated with the 'case' statement is executed. In most other respects, the 'case' statement is semantically identical to an 'if' statement. For example, it can be followed by an 'else' clause, and can be used as a postfix statement qualifier. However, when a 'case' block has been executed control is automatically transferred to the statement after the immediately enclosing 'switch' block, rather than to the next statement within the block. In other words, the success of any 'case' statement prevents other cases in the same scope from executing. But see the "Allowing fall-through" manpage below. Together these two new statements provide a fully generalized case mechanism: use Switch; %special = ( woohoo => 1, d'oh => 1 ); while (<>) { chomp; switch ($_) { case (%special) { print "homer\n"; } # if $special{$_} case /[a-z]/i { print "alpha\n"; } # if $_ =~ /a-z/i case [1..9] { print "small num\n"; } # if $_ in [1..9] case { $_[0] >= 10 } { print "big num\n"; } # if $_ >= 10 print "must be punctuation\n" case /\W/; # if $_ ~= /\W/ } } Note that 'switch'es can be nested within 'case' (or any other) blocks, and a series of 'case' statements can try different types of matches -- hash membership, pattern match, array intersection, simple equality, etc. -- against the same switch value. The use of intersection tests against an array reference is particularly useful for aggregating integral cases: sub classify_digit { switch ($_[0]) { case 0 { return 'zero' } case [2,4,6,8] { return 'even' } case [1,3,5,7,9] { return 'odd' } case /[A-F]/i { return 'hex' } } }

Other Packages Related to perl-Switch:

  • dep: perl(:MODULE_COMPAT_5.42.0)

    Package not available

  • dep: perl(Text::Balanced) (>= 2)

    Package not available

Download perl-Switch

ArchitecturePackage SizeInstalled SizeFiles
noarch27 KiB38 KiB[list of files]

Package file paths (5)

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.42.0/Switch.pm
  • /usr/share/doc/packages/perl-Switch
  • /usr/share/doc/packages/perl-Switch/Changes
  • /usr/share/doc/packages/perl-Switch/README
  • /usr/share/man/man3/Switch.3pm.gz

Field source: openSUSE Leap 16.0 OSS revision leap-16-0-oss-multiarch:271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c

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.

Versions, suites, and repositories

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.

VersionReleaseArchitectureRepositoryPackage sizeInstalled sizePublisher repository artifact
2.17-160000.2.2leap-16.0 / ossnoarchopenSUSE Leap 16.0 · OSS · multi-architecture27 KiB38 KiBnoarch/perl-Switch-2.17-160000.2.2.noarch.rpm

Field source: openSUSE Leap 16.0 OSS revision leap-16-0-oss-multiarch:271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c

Checksums and observation dates

For an APT source, signature verification authenticates the repository metadata chain and the Packages index containing this source-reported artifact digest. It does not certify package safety.

2.17-160000.2.2 / noarchObserved Sep 1, 2026 to Sep 1, 2026

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

Source-reported sha512: 31b9518827323d2d8f2d42d1b8bf1fe24603a4a270f780a2f17381cdf8eaa941a2f6aae6a5f5689d6448c46ecaf7d228208b5d734a394d122a0441cdb0c3d38c

Field source: openSUSE Leap 16.0 OSS revision leap-16-0-oss-multiarch:271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c

Catalog record completeness

The completeness score measures metadata coverage, not software quality, security, compatibility, or suitability.

Summary and description
25/25
Artifact path and source digest
25/25
Dependency metadata
15/15
Package-file index
15/15
Homepage
5/5
License text
5/5
Source package or maintainer
10/10

Recorded total: 100/100

Field source: openSUSE Leap 16.0 OSS revision leap-16-0-oss-multiarch:271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c. The cross-OS mapping is catalog-derived from the source-reported homepage; it does not establish authorship or publisher identity

Sources and provenance

Field-source links above resolve here. Each source entry names the metadata publisher, trust tier, exact snapshot revision, signature result, and observation time; catalog-derived mappings are labeled separately.

  • Authoritative source; repository metadata signature verified, revision leap-16-0-oss-multiarch:271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c

    Signature verification covers the configured repository metadata chain. It does not certify that the package is safe or suitable.

    Repository-signature verification record
    Signed-object SHA-256
    271b36d440253edf9871ac0c100319fc7443d8f2d54b6b449a72e9414c51577c
    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
    Signed Release → package-index hash linkage

    Path: Not recorded
    Expected SHA-256: Not recorded
    Observed SHA-256: Not recorded
    Result: match verified

perl-Switch Package for openSUSE Leap 16.0 | OpenFactory