diff --git a/mode/perl.py b/mode/perl.py index 0868fc7..513318c 100644 --- a/mode/perl.py +++ b/mode/perl.py @@ -755,6 +755,9 @@ class Perl(mode.Fundamental): def get_line_function(self, y): if self.funclines is None: self.build_function_map() - return self.funclines[y] + if y < len(self.funclines): + return self.funclines[y] + else: + return None install = Perl.install