The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Package::Transporter::Generator::Potential::Shell - Bridge to Shell.pm

SYNOPSIS

        delete($ENV{'ENV'});
        $ENV{'PATH'} = '/usr/local/bin:/usr/bin:/bin';
        
        use Package::Transporter sub{eval shift}, sub {
                $_[0]->register_potential('::Shell', 'FOR_SELF');
        };
        
        sub yn($) { print STDERR ($_[0] ? 'Yes' : 'No'), "\n"; };
        
        yn(!defined(&shell_ls));
        yn(potentially_defined('shell_ls'));
        
        print STDOUT shell_ls('-l');
        
        yn(defined(&shell_ls));
        exit(0);

DESCRIPTION

Executes the part of the dynamic subroutine name after shell_ as a shell command. The work is done by Shell.pm, but not via its AUTOLOAD.

ANYTHING ELSE

Please see the documentation of the upstream package Package::Transporter.