--- rxvt-unicode/src/urxvt.pm 2006/01/02 20:35:39 1.8 +++ rxvt-unicode/src/urxvt.pm 2006/01/02 21:41:51 1.11 @@ -1,25 +1,27 @@ =head1 NAME -rxvtperl - rxvt-unicode's embedded perl interpreter +@@RXVT_NAME@@perl - rxvt-unicode's embedded perl interpreter =head1 SYNOPSIS -* Put your scripts into F<@@RXVT_LIBDIR@@/urxvt/perl-ext/>, they will be loaded automatically. - -* Scripts are evaluated in a 'use strict' and 'use utf8' environment, and -thus must be encoded as UTF-8. + # create a file grab_test in $HOME: sub on_sel_grab { warn "you selected ", $_[0]->selection; () } - 1 + # start a @@RXVT_NAME@@ using it: + + @@RXVT_NAME@@ --perl-lib $HOME -pe grab_test =head1 DESCRIPTION Everytime a terminal object gets created, scripts specified via the -C resource are associated with it. +C resource are loaded and associated with it. + +Scripts are compiled in a 'use strict' and 'use utf8' environment, and +thus must be encoded as UTF-8. Each script will only ever be loaded once, even in @@RXVT_NAME@@d, where scripts will be shared (But not enabled) for all terminals. @@ -124,6 +126,12 @@ Called just after the screen gets redrawn. See C. +=item on_keyboard_command $term, $string + +Called whenever the user presses a key combination that has a +C action bound to it (see description of the B +resource in the @@RXVT_NAME@@(1) manpage). + =back =head2 Functions in the C Package @@ -228,7 +236,7 @@ my $htype = shift; if ($htype == 0) { # INIT - my @dirs = ((split /:/, $term->resource ("perl_lib")), $LIBDIR); + my @dirs = ((split /:/, $term->resource ("perl_lib")), "$LIBDIR/perl"); for my $ext (split /:/, $term->resource ("perl_ext")) { my @files = grep -f $_, map "$_/$ext", @dirs;