Skip to content
gugod edited this page May 25, 2011 · 10 revisions

Description

Since 0.21, the current symlink is ditched in favor of bash-based multi-user support. However, the change discourage non-interactive uses of perlbrew because people will have to put the versioned path in shebang, which makes it troublesome when it is time to switch to different perl for those program.

An 'alias' command is introduced to generalize the need. current symlink is no longer a special one, but just a name specified by users.

Usage

perlbrew alias [-f] <action> <name> [<alias>]

Action is one of: create, delete, rename

-f flag is used to forcibly perform the action.

<name> should be one of the installation names, <alias> is the given alternative name.

Synopsis

# essentially ln -s perl-5.14.0 current.
#     should fail if 'perl-5.14.0' does not exist.
#     should fail if 'current' already exists.
perlbrew alias create perl-5.14.0 current

# delete the alias
perlbrew alias delete current

# renaming
#     should fail if `current` does not exist.
#     should fail if `main` already exists.
perlbrew alias rename current main

# -f for force override
#    should still fail if the alias refers to a non-alias installation.
#    should still fail if the name does not exists (`perl-5.14.0` and `current` in the following cases)
perlbrew alias -f create perl-5.14.0 current
perlbrew alias -f rename current main
Clone this wiki locally