in reply to Table::Extract unblessed reference

tables () is depricated and should be replaced by table_states ().

use warnings; use strict; use HTML::TableExtract; my $te = HTML::TableExtract->new (attribs => {align => 'center'}); my $data = join "", <DATA>; $te->parse ($data); foreach my $ts ($te->table_states ()) {print "R ", join (',', @$_), "\n" foreach $ts->rows ();}
__DATA__ <html> <body> <table align="center"> <tr><td>Name</td><td>Blah</td></tr> <tr><td>bill</td><td>fdagdfg</td></tr> <tr><td>ted</td><td>sdfsdf</td></tr> </table> </body> </html> R Name,Blah R bill,fdagdfg R ted,sdfsdf

Perl is Huffman encoded by design.

Replies are listed 'Best First'.
Re^2: Table::Extract unblessed reference
by mojotoad (Monsignor) on Aug 01, 2005 at 06:49 UTC
    as for deprecated methods, see my comment above -- it's the other way around. table_states() is deprecated, tables() is the shortened version. Both still work at the moment.

    Matt

      I was going to quote from the current documentation to show how confusing it is. I realised that not only is the Deprecation section of the documentation confusing, but it proposes changes that are down right nasty because they involve various gratuitous breaking changes to the current interface.

      Somehow I'm not surprised that about half of those replying to OP were confused!


      Perl is Huffman encoded by design.
        Please elaborate. As the author of said documentation, I'm always open to editorial advice, particularly from end-users since it offers a different perspective from my own.

        As for the deprecations...the old methods will probably never go away (they'll be aliased to the the shorter versions). But I'd be remiss in not flagging them as deprecated.

        Cheers,
        Matt