Next Tricks of the Wizards 48

A Templating System

Install Hash Variables Into the New Package

        sub package_install {
          my ($h, $p) = @_;
          my $n;
          while ($n = each %$h) {
            my $v = $h->{$n};
            *{$p . '::' . $n} = (ref $v ? $v : \$v);
          }
        }


Next Copyright © 2003 M. J. Dominus