G Inspire
Included librariesPackage variablesGeneral documentationMethods
Package variables
Privates (from "my" definitions)
%data;
$hsGCF;
Included modules
G::Messenger
SelfLoader
Inherit
Exporter
Synopsis
No synopsis!
Description
No description!
Methods
OnExecute
No description
Code
OnGenerate
No description
Code
OnSave
No description
Code
SetScript
No description
Code
Methods description
None available.
Methods code
OnExecutedescriptionprevnextTop
sub OnExecute {
  my $msg = '';

  G::Messenger::msg_error("Start Analysis:\n");

  {
	no strict 'refs';
        $msg = &{"G::System::" . $data{'engine'} . '::' 
		     . $data{'engine'} . '_engine'}($data{'script'}, -src=>"");
  }

  sleep(1);
  chdir('../') unless ($msg eq 'HOGE');

  G::Messenger::msg_error("Done.\n");
}
OnGeneratedescriptionprevnextTop
sub OnGenerate {
    my $str = shift;

    {
	no strict 'refs';
        &{"G::System::" . $data{'engine'} . '::' . $data{'engine'}
	  . '_engine'}($data{'script'}, -src=>"$str");
    }

    &G::Messenger::msg_error("Script generated.\n");
}
OnSavedescriptionprevnextTop
sub OnSave {
  my $script = shift;
  $hsGCF = shift;
  my $out = '';

  {
	no strict 'refs';
        $out = &{"G::System::" . $data{'engine'} . '::' . $data{'engine'} . 
		'_scripter'}($hsGCF);
  }

  open(OUT, '>' . $script) || G::Messenger::msg_error("Cannot open the file to save.\n");
  print OUT $out;
  close(OUT);

  &G::Messenger::msg_error("Saved GCF.\n");
}
SetScriptdescriptionprevnextTop
sub SetScript {
    my $script = shift;

    $data{'script'} = $script;

    unless(lstat $data{'script'}){
	G::Messenger::msg_error("Error: No such GCF script - " , $data{'script'}, "\n");
	return;
    }

    open(FILE,$data{'script'});
    while(<FILE>){
    	$data{'engine'} = $1 if(/>Engine:\s(.+)/);
    	$data{'configure'} = $1 if(/>Configure:\s(.+)/);
    }
    close(FILE);

    my $tmp = $data{'engine'};
    my $evalstr = 'G::System::' . $tmp . '::' . $tmp;
    $evalstr .= "\_parser";

    {
	no strict 'refs';
	$hsGCF = &{$evalstr}($script);
        G::Messenger::msg_error("Engines set from GCF.\n");
    }

    return $hsGCF;
}
General documentation
No general documentation available.