in reply to Accessing variables in a runtime-loaded module
What's the error message that you get? That problematic line works for me.
where Foo.pm is#!/usr/bin/perl use lib "/Users/brian/Desktop"; require "Foo.pm"; $module = 'Foo'; print $module->description, "\n";
package Foo; sub description { "Hello there!" } 1;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Accessing variables in a runtime-loaded module
by srd (Initiate) on Jun 09, 2005 at 13:19 UTC | |
by rev_1318 (Chaplain) on Jun 09, 2005 at 14:22 UTC | |
by brian_d_foy (Abbot) on Jun 09, 2005 at 17:10 UTC |