Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re: I'm clueless. How to subclass Palm::Raw

by leriksen (Curate)
on Jun 28, 2006 at 00:05 UTC ( #557903=note: print w/ replies, xml ) Need Help??


in reply to I'm clueless. How to subclass Palm::Raw

in ( I suggest ) lib/Palm/AGsu.pm...

package Palm::AGsu; use strict; use warnings; use base qw(Palm::Raw); sub get_field_by_name { my ($self, $name) = @_; .... } sub you_other_methods_here { my ($self, $param1, $param2,...) = @_; .... } .... 1;
In t/Palm/AGsu.t
#!/usr/bin/perl -w use Test::More qw(no_plan); # for now ... BEGIN { use_ok('Palm::AGsu') or die "cannot use Palm::AGsu'; }; require_ok('Palm::AGsu'); my pa = Palm::AGsu->new(...whatever...); isa_ok($pa, 'Palm::AGsu'); is($pa->get_field_by_name('some field'), 'some value', 'some field == +some value'); ...

Then you can do this

prove -vl t/Palm/AGsu.t ...<output from test harness>...

...reality must take precedence over public relations, for nature cannot be fooled. - R P Feynmann


Comment on Re: I'm clueless. How to subclass Palm::Raw
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://557903]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others avoiding work at the Monastery: (10)
As of 2015-07-07 11:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (88 votes), past polls