in reply to [SOLVED] Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'

The Deep recursion on subroutine ... is a warning, not an error. It may be an important symptom that something may be going wrong, but this in itself will not stop your program from continuing to run. This warning is displayed when you recurse more than 100 levels. Consider this one-liner implementation of the factorial function:
$ perl -wE 'say fact(102); sub fact {my $c = shift; return 1 if $c == +1; return $c *fact($c-1)}' Deep recursion on subroutine "main::fact" at -e line 1. 9.61446671503512e+161
We have the warning, but the program continued and printed the result.

But you can silence that warning if you know well enough what you are doing, using the no warnings "recursion"; pragma. For example:

$ perl -wE 'say fact(102); sub fact {my $c = shift; return 1 if $c == +1; no warnings "recursion"; return $c *fact($c-1)}' 9.61446671503512e+161
If your program stops working, it may be because your program recurses really too much, but you should presumably have another message, an actual error message (instead of a warning), telling you why it stopped (out of memory or something).

  • Comment on Re: Problem merging thousands of PDFs with PDF::API2: 'Deep recursion on subroutine "PDF::API2::Basic::PDF::Objind::release"'
  • Select or Download Code