John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
However, when I tested it, I was told "import parameter is not a string..." which is true enough, but not what I wanted to hear!
It looks like the implicit call to import() from a use will check the parameters in ways that a normal call does not.
Why?
Update: tye points out that it is the implementation of import that's doing it! I'm presuming that this parameter didn't get removed earlier as it should, but the point is I'll have to look some place totally different than I was. And as bbfu found out, having the exporter export itself has a strange way of messing with your mind.
Update2: The problem was in passing the wrong value to the function that was supposed to extract the hashref from the parameter list.
I think it's unnecessary to constrain the implementor of import. After all, it's supposed to be "wide open", so why get in my way?
Can anyone give a good reason why it should do this kind of checking? After all, the function itself can check the parameters, if necessary or to coddle the user.
—John
Edit by tye to fix pad link
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
(tye)Re: Import parameter not a string - grrr
by tye (Sage) on Dec 04, 2002 at 06:40 UTC | |
by John M. Dlugosz (Monsignor) on Dec 04, 2002 at 16:45 UTC | |
|
(bbfu) Re: Import parameter not a string - grrr
by bbfu (Curate) on Dec 04, 2002 at 06:30 UTC | |
by John M. Dlugosz (Monsignor) on Dec 04, 2002 at 17:00 UTC | |
by John M. Dlugosz (Monsignor) on Dec 05, 2002 at 04:53 UTC |