Perl will now capture return values (lua style), yeah I said I wouldn't be improving much of perl from here on but I said if I found a way I'd do it.

This commit is contained in:
KimLS
2013-07-05 02:56:53 -07:00
parent b11ed32bcf
commit 3c8d83f2a8
4 changed files with 65 additions and 53 deletions
+3 -3
View File
@@ -89,9 +89,9 @@ public:
//return the last error msg
std::string lasterr(void) const { return errmsg;};
//evaluate an expression. throws string errors on fail
void eval(const char * code);
int eval(const char * code);
//execute a subroutine. throws lasterr on failure
void dosub(const char * subname, const std::vector<std::string> * args = nullptr, int mode = G_SCALAR|G_DISCARD|G_EVAL);
int dosub(const char * subname, const std::vector<std::string> * args = nullptr, int mode = G_SCALAR|G_EVAL);
//Access to perl variables
//all varnames here should be of the form package::name
@@ -145,7 +145,7 @@ public:
//loads a file and compiles it into our interpreter (assuming it hasn't already been read in)
//idea borrowed from perlembed
void eval_file(const char * packagename, const char * filename);
int eval_file(const char * packagename, const char * filename);
inline bool InUse() const { return(in_use); }