| CPAN-Packager documentation | Contained in the CPAN-Packager distribution. |
CPAN::Packager::Config::Replacer - replace variables like HOME
use CPAN::Packager::Config::Replacer;
Takatoshi Kitano <kitano.tk@gmail.com>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| CPAN-Packager documentation | Contained in the CPAN-Packager distribution. |
package CPAN::Packager::Config::Replacer; use strict; use warnings; sub replace_variable { my ($class, $variable) = @_; $variable = $class->_replace_home($variable); $variable; } sub _replace_home { my ($class, $variable) = @_; $variable =~ s/^~/$ENV{HOME}/; $variable; } 1; __END__