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

Things I Don't Use in Perl

by Ovid (Cardinal)
on Aug 23, 2005 at 15:47 UTC ( #485945=perlmeditation: print w/replies, xml ) Need Help??

Help for this page

Select Code to Download


  1. or download this
    sub name :lvalue { shift->name }
    
    # and later
    
    $object->name = 
      [qw/ random unvalidated value which breaks encapsulation /];
    
  2. or download this
    sub name {
      my $self = shift;
      return $self->{name} unless @_;
      $self->{name} = shift;
      return $self;
    }
    
  3. or download this
    sub set_name {
      my $self = shift;
      croak "set_name() requires a name, silly!" unless @_;
      $self->{name} = shift; # insert other validation here
    }
    
  4. or download this
    $object->name($name);
    $object->age($age);
    $object->id($id); # huh?
    
  5. or download this
    $object->set_name($name);
    $object->set_age($age);
    $object->set_id($id); # huh?
    

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://485945]
Approved by Arunbear
Front-paged by Arunbear
help
Chatterbox?
[Corion]: usemodperl: Well, if the world changes and makes your "wonderful" approach not work anymore, you can either change your approach, or change the world. You seem to want to change others instead.
[usemodperl]: no dude i'm just asking how to access meta via http and you are getting defensive for some reason (did you turn off http at meta? :-)
[choroba]: why do you need to access metacpan via http?
[usemodperl]: stop asking why, just say how
usemodperl pulls teeth...
[usemodperl]: change the world? you mean BREAK THE WEB? we will regret this once google starts pulling certs for cursing or something...
Veltro Sees open mouth and feeds troll
[Corion]: usemodperl: Naah, you're just being unreasonable. It's not hard to download https URLs, and we've shown you ways to avoid downloading at all, and ways to keep downloading via http possible. You reject both.
[choroba]: Also, try asking at IRC
[usemodperl]: corion baby you have done nothing of the sort

How do I use this? | Other CB clients
Other Users?
Others perusing the Monastery: (10)
As of 2018-06-24 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Should cpanminus be part of the standard Perl release?



    Results (126 votes). Check out past polls.

    Notices?