Re: require fails yet module exists in @INC path...?




"Chris" <newsbot@xxxxxxx> wrote in message
news:1116442508.603144.117180@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
> Thanks for the tip on that. I'll look into doing this. Seems much
> simpler.
>
> But I'm not any further along on the other issue. I maintain that I am
> using require that correct way (though at one point I thought maybe I
> was not). I continue to be baffled because this isn't like the first
> time I've done a:
>
> eval qq{ require $class };
>
> where $class = "Some::Module::Name";
>
> And A1, A2, B1, and B2 work this way. C1 does not.
>

If $class contains a string like "Some::Module::Name" then I'm finding that
it's ok to do:
eval qq{require $class};

but not:
eval {require $class};

and not:
require $class;

The last 2 will inevitably complain that "Some::Module::Name" can't be
found.
The first will function as desired.

If you want to use either of the last 2, then $class needs to be a string
like "Some/Module/Name.pm".

Cheers,
Rob


.



Relevant Pages

  • Re: Time Calculation
    ... create a string yourself, such as: ... The pattern should be obvious so you can make it as complex as you ... Rob ... Prev by Date: ...
    (microsoft.public.excel.worksheet.functions)
  • Re: How to Loop through Items in a list box
    ... Rob ... > For Each item As String In Me.ListBox1.Items ... Prev by Date: ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Extracting information from a list
    ... Bob & Harald, ... Rob ... > Function This(S As String) As RowInfo ... > Dim C As String, ...
    (microsoft.public.excel.programming)
  • Re: Filename problem
    ... Rob and Frank, ... changed the subroutine call to use a hard-wired "Joe" instead of this ... starting string, and it found the file just fine with that. ... I used that same string in another prior filename ands it ...
    (microsoft.public.excel.programming)
  • Re: can someone please help me with making this class
    ... struct and another I put the insert in. ... string phoneNo; ... node *temp, *prev; ...
    (microsoft.public.vc.language)