If you enter the source code below, you will get a "mismatched parentheses" error when entering { customer_id => { '=' => \'me.customer_id' } because the backslash in front of 'me.customer_id' throws cperl-mode off ==== begin sample source code ==== sub execute { my ($self, $opt, $args) = @_; my $p_rs = $self->app->schema->resultset('Payment'); my $rs = $p_rs->search ({ amount => { '>' => $p_rs->search ( { customer_id => { '=' => \'me.customer_id' } ==== end sample source code ==== If Emacs crashed, and you have the Emacs process in the gdb debugger, please include the output from the following gdb commands: `bt full' and `xbacktrace'. If you would like to further debug the crash, please read the file /usr/share/emacs/23.1/etc/DEBUG for instructions. In GNU Emacs 23.1.1 (i486-pc-linux-gnu, X toolkit, Xaw3d scroll bars) of 2010-03-26 on palmer, modified by Debian Windowing system distributor `The X.Org Foundation', version 11.0.10604000 configured using `configure '--build=i486-linux-gnu' '--host=i486-linux-gnu' '--prefix=/usr' '--sharedstatedir=/var/lib' '--libexecdir=/usr/lib' '--localstatedir=/var/lib' '--infodir=/usr/share/info' '--mandir=/usr/share/man' '--with-pop=yes' '--enable-locallisppath=/etc/emacs23:/etc/emacs:/usr/local/share/emacs/2 3.1/site-lisp:/usr/local/share/emacs/site-lisp:/usr/share/emacs/23.1/sit e-lisp:/usr/share/emacs/site-lisp:/usr/share/emacs/23.1/leim' '--with-x=yes' '--with-x-toolkit=lucid' '--with-toolkit-scroll-bars' 'build_alias=i486-linux-gnu' 'host_alias=i486-linux-gnu' 'CFLAGS=-DDEBIAN -g -O2' 'LDFLAGS=-g' 'CPPFLAGS='' Important settings: value of $LC_ALL: nil value of $LC_COLLATE: nil value of $LC_CTYPE: nil value of $LC_MESSAGES: nil value of $LC_MONETARY: nil value of $LC_NUMERIC: nil value of $LC_TIME: nil value of $LANG: en_US.UTF-8 value of $XMODIFIERS: nil locale-coding-system: utf-8-unix default-enable-multibyte-characters: t Major mode: CPerl Minor modes in effect: shell-dirtrack-mode: t desktop-save-mode: t show-paren-mode: t global-auto-revert-mode: t tooltip-mode: t mouse-wheel-mode: t menu-bar-mode: t file-name-shadow-mode: t global-font-lock-mode: t font-lock-mode: t blink-cursor-mode: t global-auto-composition-mode: t auto-encryption-mode: t auto-compression-mode: t column-number-mode: t line-number-mode: t transient-mark-mode: t Recent input: C-s C-n C-n C-p C-n C-SPC C-n C-n C-n C-n C-n C-n C-e C-w SPC SPC * SPC SPC * * C-n C-n C-b C-d C-d C-n C-f C-f C-f C-f SPC SPC C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-f C-x C-s C-n C-n C-n C-n C-n C-a C-k C-p C-o m y SPC $ p _ r s SPC = SPC $ s e l f - > a p p - . > s c e h h e m a - > r e s u l t s e t ( ' P a y m e n t ' ) ; m y SPC $ p r s SPC = SPC $ p _ r s - > s e a r c h ( { C-p C-p C-n C-b C-b C-n a m o u n t SPC = > SPC { SPC ' > = ' SPC = > SPC $ p _ r s - > s e a r c h ( { { SPC c u s t o m e r _ i d SPC = > SPC { SPC ' = ' SPC = > SPC \ ' m e . c u s t o m e r _ i d ' SPC } SPC } C-x 0 } ESC x r e p o r t - e m Recent messages: Saving file /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm... Wrote /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm Mark set [2 times] Saving file /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm... Wrote /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm Mark set Saving file /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm... Wrote /home/metaperl/prg/DBIx-Cookbook/lib/DBIx/Cookbook/DBIC/Command/correlat ed_subquery.pm Auto-saving...done Auto-saving...