Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: OOP: How to (not) lose Encapsulation

by jeffa (Bishop)
on May 12, 2015 at 22:48 UTC ( [id://1126475]=note: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    package My::Abstract::Interface;
    use Moose::Role;
    requires qw( foo bar baz qux );
    
  2. or download this
    package My::Abstract::Interface;
    use Carp;
    ...
    sub bar { croak }
    sub baz { croak }
    sub qux { croak }
    
  3. or download this
    #!/usr/bin/env perl 
    
    ...
    
    my $bar = Bar->new( %$foo );
    print $bar->to_string, $/;
    

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others admiring the Monastery: (4)
As of 2024-04-24 22:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found