in reply to calling scalar from scalar. symlinks

It's very hard to tell what you want. Are you trying to return \&Web::Config::destination where Web::Config is dynamic?
sub SetDestination { my ($self, $class) = @_; $self->{destination} = do { no strict 'refs'; \&{"${class}::destination"} }; } sub ... { my ($self, ...) = @_; ... $self->{destination}->(...); ... }

In any case, this is poor design. Why not just pass $config?

sub SetDestination { my ($self, $config) = @_; $self->{config} = $config; } sub ... { my ($self, ...) = @_; ... $self->{config}->destination(...); ... }

Replies are listed 'Best First'.
Re^2: calling scalar from scalar. symlinks
by thezip (Vicar) on Oct 25, 2006 at 21:36 UTC
    Your package needs to return a true value -- ie. the last line of the package should be:
    1;
    Where do you want *them* to go today?

        My apologies -- I replied to the wrong message...

        Where do you want *them* to go today?