--- rxvt-unicode/src/rxvtd.C 2012/01/19 13:33:43 1.59 +++ rxvt-unicode/src/rxvtd.C 2014/05/22 18:54:33 1.61 @@ -7,7 +7,7 @@ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or + * the Free Software Foundation; either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, @@ -228,6 +228,9 @@ ptytty::init (); static char opt_fork, opt_opendisplay, opt_quiet; +#if ENABLE_PERL + static char *opt_eval; +#endif #if ENABLE_MLOCK static char opt_lock; #endif @@ -244,6 +247,10 @@ else if (!strcmp (argv [i], "-m") || !strcmp (argv [i], "--mlock")) opt_lock = 1; #endif +#if ENABLE_PERL + else if (!strcmp (argv [i], "-e") || !strcmp (argv [i], "--eval")) + opt_eval = argv [++i]; +#endif else { rxvt_log ("%s: unknown option '%s', aborting.\n", argv [0], argv [i]); @@ -253,6 +260,14 @@ rxvt_init (); +#if ENABLE_PERL + if (opt_eval) + { + rxvt_perl.init (); + rxvt_perl.eval (opt_eval); + } +#endif + // optionally open display and never release it. if (opt_opendisplay) if (const char *dpy = getenv ("DISPLAY"))