While trying to do this:
my $obj = new JavaScript::Minifier;
$obj->minify(*STDIN, *STDOUT);
// modified above line to
$obj->minify(*IP_HANDLE,*OP_HA
The *
refers to a Perl "typeglob", which is an obscure implementation detail of Perl. Some older Perl code needs to refer to file handles using typeglobs (since there wasn't any other way to do it at the time). More modern code can use filehandle references instead, which are easier to work with.
The *
is analogous to $
or %
, it refers to a different kind of object known by the same name.
From the perldata
documentation page:
Perl uses an internal type called a typeglob to hold an entire symbol table entry. The type prefix of a typeglob is a * , because it represents all types. This used to be the preferred way to pass arrays and hashes by reference into a function, but now that we have real references, this is seldom needed.