I also agree with the poster above who mentioned using a config file. That seems the safer place to check if it's production, and just return different server/user/pass values if it is the devel server.package Custom:FTP; use base qw( Net::FTP ); sub login { my $self = shift; my @opts = @_; if (_not_prod()) { $opts[0] = 'testuser'; $opts[1] = 'testpassword'; } return $self->SUPER::login(@opts); } sub _not_prod { # check production }
In reply to Re: Inheritance confusion
by cowboy
in thread Inheritance confusion
by the_slycer
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |