I'm still trying to figure out why you have just "lib" instead of "use lib"
there. And why it's not throwing an error.

On Sun, Jun 3, 2018 at 6:02 PM ToddAndMargo <toddandma...@zoho.com> wrote:

> On 06/03/2018 02:50 PM, Brandon Allbery wrote:
> > Double quotes, or the one we were just discussing a few minutes ago.
> >
> >      use lib "./";
> >      use lib <./>;
> >
> > The trailing / doesn't do anything useful there, by the way.
> >
> > On Sun, Jun 3, 2018 at 5:48 PM ToddAndMargo <toddandma...@zoho.com
> > <mailto:toddandma...@zoho.com>> wrote:
> >
> >      >> On Sun, Jun 3, 2018 at 5:28 PM ToddAndMargo
> >     <toddandma...@zoho.com <mailto:toddandma...@zoho.com>
> >      >> <mailto:toddandma...@zoho.com <mailto:toddandma...@zoho.com>>>
> >     wrote:
> >      >>
> >      >>     Hi All,
> >      >>
> >      >>     What am I doing wrong here?
> >      >>
> >      >>
> >      >>            $ p6 'lib \'./\'; use RunNoShell; ( my $a, my $b ) =
> >      >>     RunNoShell::RunNoShell("ls *.pm6"); say $a;'
> >      >>
> >      >>            bash: syntax error near unexpected token `='
> >      >>
> >      >>     Huh ???
> >      >>
> >      >>
> >      >>     This is RunNoShell.pm6
> >      >>
> >      >>           sub RunNoShell ( $RunString ) is export {
> >      >>              ...
> >      >>              return ( $ReturnStr, $RtnCode );
> >      >>           }
> >      >>
> >      >>     Many thanks,
> >      >>     -T
> >
> >     On 06/03/2018 02:36 PM, Brandon Allbery wrote:
> >      > bash doesn't like nested single quotes, even with escapes. So the
> >     first
> >      > \' gave you a literal backslash and ended the quoted part, then
> the
> >      > second \' gave you a literal ' and continued without quoting. The
> >     final
> >      > ' would then open a new quoted string, but bash doesn't get that
> far
> >      > because it sees the (now unquoted) parentheses and tries to parse
> >     them
> >      > as a command expansion.
> >      >
> >      > allbery@pyanfar ~/Downloads $ echo 'x\'y\'z'
> >      >  > ^C
> >      >
> >      > Note that it thinks it's still in a quoted string and wants me to
> >     continue.
> >      >
> >
> >     p6 does not like `lib ./`,  meaning use the current directory
> >     without the single quotes.  Any work around?
>
>
> sniffle ...
>
> $ p6 'lib "./"; use RunNoShell; ( my $a, my $b ) =
> RunNoShell::RunNoShell("ls \*.pm6"); say $a;'
> ===SORRY!===
> Could not find RunNoShell at line 1 in:
>      /root/.perl6
>      /opt/rakudo-pkg/share/perl6/site
>      /opt/rakudo-pkg/share/perl6/vendor
>      /opt/rakudo-pkg/share/perl6
>      CompUnit::Repository::AbsolutePath<62676288>
>      CompUnit::Repository::NQP<39210120>
>      CompUnit::Repository::Perl5<39210160>
>
> $ p6 'lib <./>; use RunNoShell; ( my $a, my $b ) =
> RunNoShell::RunNoShell("ls \*.pm6"); say $a;'
> ===SORRY!===
> Could not find RunNoShell at line 1 in:
>      /root/.perl6
>      /opt/rakudo-pkg/share/perl6/site
>      /opt/rakudo-pkg/share/perl6/vendor
>      /opt/rakudo-pkg/share/perl6
>      CompUnit::Repository::AbsolutePath<70406256>
>      CompUnit::Repository::NQP<46533808>
>      CompUnit::Repository::Perl5<46533848>
>


-- 
brandon s allbery kf8nh                               sine nomine associates
allber...@gmail.com                                  ballb...@sinenomine.net
unix, openafs, kerberos, infrastructure, xmonad        http://sinenomine.net

Reply via email to