< Home - < Back

perl-Context-Preserve


Information about the package, perl-Context-Preserve, which is shipped with common Linux distributions. The perl-Context-Preserve package is designed for, Run code after a subroutine call, preserving context.


Package Name:

perl-Context-Preserve

Summary:

Run code after a subroutine call, preserving context

Description:

Sometimes you need to call a function, get the results, act on the results, then return the result of the function. This is painful because of contexts; the original function can behave different if it's called in void, scalar, or list context. You can ignore the various cases and just pick one, but that's fragile. To do things right, you need to see which case you're being called in, and then call the function in that context. This results in 3 code paths, which is a pain to type in (and maintain). This module automates the process. You provide a coderef that is the "original function", and another coderef to run after the original runs. You can modify the return value (aliased to @_) here, and do whatever else you need to do. 'wantarray' is correct inside both coderefs; in "after", though, the return value is ignored and the value 'wantarray' returns is related to the context that the original function was called in.

Architecture:

noarch

Version:

0.01

Release:

1.el6

Size:

9.7 k

Repository:

epel

From Repository:

Licence:

GPL+ or Artistic



Handy Yum Commands for perl-Context-Preserve


Control the perl-Context-Preserve package with the following handy commands outlined below.


Command

Description of Command

yum install perl-Context-Preserve

This command will install perl-Context-Preserve on the server.

yum remove perl-Context-Preserve

This command will un-install perl-Context-Preserve on the server. When you run this command, you will be asked if you are sure that you want to remove perl-Context-Preserve, so you have to manually confirm that you want to do this.

yum -y remove perl-Context-Preserve

This command will un-install perl-Context-Preserve on the server. When you run this command with th e -y flag, you will not be prompted to check that you are sure you want to remove the package - so be sure you absolutely want to remove perl-Context-Preserve when using the -y flag.

yum update perl-Context-Preserve

This command will update perl-Context-Preserve to the latest version. When you run this command, you will be asked if you are sure that you want to remove perl-Context-Preserve, so you have to manually confirm that you want to do this.

yum -y update perl-Context-Preserve

This command will update perl-Context-Preserve to the latest version. When you run this command with the -y flag, you will not be prompted to check that you are sure you want to remove the package - so be sure you absolutely want to remove perl-Context-Preserve when using the -y flag.

yum info perl-Context-Preserve

This command will show you core information about the perl-Context-Preserve package.

yum deplist perl-Context-Preserve

This command will show you the dependencies for perl-Context-Preserve. Thankfully, when using Yum, if dependencies are required, these are also installed at the same time so you don't have to worry too much about that.

yum check-update perl-Context-Preserve

This command will check if there is an update waiting on perl-Context-Preserve. When you run this command this will return nothing if there is nothing to update, or, will return the package name if the package is due to be updated.