in reply to Re: Simple OO question...
in thread Simple OO question...

You're right. Understanding prototypes re Perl was never my strong suit. Old habits are hard to break.

Replies are listed 'Best First'.
Re^3: Simple OO question...
by poj (Abbot) on Apr 30, 2019 at 19:05 UTC
    passing the object handle from sub to sub)
    &display_data($Tobj);

    alternatively call methods on the object

    $Tobj->display_data()

    For example

    #!/usr/bin/perl use strict; use lib './my_app'; use my_app::db; use my_app::page; my $dbh = my_app::db->connect(); my $page = my_app::page->new(); # create a page object for my $uid (1..3){ $page->init($dbh,$uid); # query database $page->display; }
    poj