Class: Perl::Shell

Inherits:
Object show all
Includes:
Common
Defined in:
lib/perl/shell.rb

Constant Summary

Constants included from Common

Common::PERL_EXIT_DESTRUCT_END, Common::PERL_EXIT_EXPECTED

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Common

#argv_to_ffi, #embedded_argv_to_ffi, #start, #stop

Constructor Details

#initializeShell

Returns a new instance of Shell.



14
15
16
17
18
19
# File 'lib/perl/shell.rb', line 14

def initialize
  Perl.setup

  @my_perl = Perl.perl_alloc
  Perl.perl_construct(@my_perl)
end

Class Method Details

.runObject



9
10
11
# File 'lib/perl/shell.rb', line 9

def run
  new.run
end

Instance Method Details

#runObject



21
22
23
24
25
26
# File 'lib/perl/shell.rb', line 21

def run
  argc, argv = argv_to_ffi

  Perl.perl_parse(@my_perl, nil, argc, argv, nil)
  Perl.perl_run(@my_perl)
end