mirror of
https://github.com/EQEmu/Server.git
synced 2026-09-03 09:26:36 +00:00
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:
+3
-3
@@ -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); }
|
||||
|
||||
|
||||
Reference in New Issue
Block a user