in reply to Re^4: Rotating a (PDF:::Table) Page Help!
in thread Rotating a (PDF:::Table) Page Help!

That's not how code references work.

  • Comment on Re^5: Rotating a (PDF:::Table) Page Help!

Replies are listed 'Best First'.
Re^6: Rotating a (PDF:::Table) Page Help!
by Anonymous Monk on Mar 31, 2009 at 19:32 UTC
    I am following the criteria here:
    http://search.cpan.org/~omega/PDF-Table-0.9.3/lib/PDF/Table.pm

      So what part of

      the parameter 'new_page_func' must be a function reference

      makes you think that passing a hash reference to it is the right way to go forward on this?

      I looked into the source code of PDF::Table and it directly calls the new_table_func reference whenever it needs a new page:

      if(ref $arg{'new_page_func'}) { $page = &{$arg{'new_page_func'}}; } else { $page = $pdf->page; }

      ... so, if you return to my above example, and modify it as follows:

      ... new_table_func => sub { my $next_page = $pdf->page; $next_page->rotate(90); return $next_page; },

      that should be all you need. But feel free to pursue other approaches at your leisure.

        OK, I am confused, could you add your implementation to the code I submitted and post it here so I can follow you?
        That would be nice! Thanks!!!