You are right. When this bug was filed it was not an optional dependency,
but then I filed
https://rt.cpan.org/Public/Bug/Display.html?id=44455
and the fix for that made it optional. So CPAN is no longer an issue and
CPAN no longer insists on loading File::HomeDir.
Tim
On Fri, May 15, 2009 at 10:15 PM, Adam Kennedy via RT <
bug-File-HomeDir@rt.cpan.org> wrote:
Show quoted text> <URL:
http://rt.cpan.org/Ticket/Display.html?id=43549 >
>
> The dependency for CPAN.pm on File::HomeDir is SUPPOSED to be an
> optional dependency for exactly that reason.
>
> How are you getting yourself into the situation of "if it doesn't work
> you can't use CPAN on that perl"?
>
> Adam K
>
> 2009/5/16 TJENNESS via RT <bug-File-HomeDir@rt.cpan.org>:
> CPAN
> > and if it doesn't work you can't use CPAN on that perl. Splitting
> > Mac::Files from Mac::Carbon and rewriting it to use Cocoa is the ideal
> > solution (I have filed a bug with Mac::Carbon) but until that happens
> people
> > who have a 64-bit perl can't use the cpan shell and that surely can't be
> a
> > good thing. It is close to encouraging the CPAN distribution to implement
> > its own version of File::HomeDir that just implements home directories
> > (Without all the additional photos and movie directory support).
> >
> > Tim
> >
> > On Fri, May 15, 2009 at 7:08 PM, Adam Kennedy via RT <
> > bug-File-HomeDir@rt.cpan.org> wrote:
> >
> >> <URL:
http://rt.cpan.org/Ticket/Display.html?id=43549 >
> >>
> >> I'm not going to make the Darwin implementation fall back to Unix, as
> >> the behaviour and return values from every method other than the core
> >> ->my_home will change.
> >>
> >> What you need to do here is to bully pudge into breaking it all up
> >> into something more maintainable, just as I eventually managed to get
> >> ActiveState to do to libwin32.
> >>
> >> I've been telling him for years to do it, it just needs people that
> >> care to convince him to let them, and then execute.
> >>
> >> Adam K
> >>
> >> 2009/5/15 Tim_Bunce via RT <bug-File-HomeDir@rt.cpan.org>:
> Darwin.
> >> >
> >> > I'd like to see this generalised.
> >> >
> >> > Mac::Files and Mac::Carbon haven't been updated since 2006. Have a
> long
> >> list of bug reports
> >> > and lots of test failures on darwin:
> >>
http://matrix.cpantesters.org/?dist=Mac-Carbon+0.77
> >> >
> >> > The fix I've been using happily is
> >> >
> >> > --- lib/perl5/File/HomeDir.pm (revision 5048)
> >> > +++ lib/perl5/File/HomeDir.pm (working copy)
> >> > @@ -56,6 +56,10 @@
> >> > } elsif ( $^O eq 'darwin' ) {
> >> > # Modern Max OS X
> >> > $IMPLEMENTED_BY = 'File::HomeDir::Darwin';
> >> > + # fallback to File::HomeDir::Unix if File::HomeDir::Darwin
> >> > + # doesn't actually work e.g. Mac::Files is missing or broken
> >> > + $IMPLEMENTED_BY = 'File::HomeDir::Unix'
> >> > + if not eval "require $IMPLEMENTED_BY;
> >> $IMPLEMENTED_BY->my_home";
> >> > } elsif ( $^O eq 'MacOS' ) {
> >> > # Legacy Mac OS
> >> > $IMPLEMENTED_BY = 'File::HomeDir::MacOS9';
> >> >
> >> >
> >> >
> >> >
> >>
> >>
> >
> >
> >
> > The problem with punting to Mac::Files is that File::HomeDir is used by
> CPAN and if it doesn't work you can't use CPAN on that perl. Splitting
> Mac::Files from Mac::Carbon and rewriting it to use Cocoa is the ideal
> solution (I have filed a bug with Mac::Carbon) but until that happens people
> who have a 64-bit perl can't use the cpan shell and that surely can't be a
> good thing. It is close to encouraging the CPAN distribution to implement
> its own version of File::HomeDir that just implements home directories
> (Without all the additional photos and movie directory support).
> >
> > Tim
> >
> > On Fri, May 15, 2009 at 7:08 PM, Adam Kennedy via RT <
> bug-File-HomeDir@rt.cpan.org> wrote:
> >>
> >> <URL:
http://rt.cpan.org/Ticket/Display.html?id=43549 >
> >>
> >> I'm not going to make the Darwin implementation fall back to Unix, as
> >> the behaviour and return values from every method other than the core
> >> ->my_home will change.
> >>
> >> What you need to do here is to bully pudge into breaking it all up
> >> into something more maintainable, just as I eventually managed to get
> >> ActiveState to do to libwin32.
> >>
> >> I've been telling him for years to do it, it just needs people that
> >> care to convince him to let them, and then execute.
> >>
> >> Adam K
> >>
> >> 2009/5/15 Tim_Bunce via RT <bug-File-HomeDir@rt.cpan.org>:
> Darwin.
> >> >
> >> > I'd like to see this generalised.
> >> >
> >> > Mac::Files and Mac::Carbon haven't been updated since 2006. Have a
> long list of bug reports
> >> > and lots of test failures on darwin:
>
http://matrix.cpantesters.org/?dist=Mac-Carbon+0.77
> >> >
> >> > The fix I've been using happily is
> >> >
> >> > --- lib/perl5/File/HomeDir.pm (revision 5048)
> >> > +++ lib/perl5/File/HomeDir.pm (working copy)
> >> > @@ -56,6 +56,10 @@
> >> > } elsif ( $^O eq 'darwin' ) {
> >> > # Modern Max OS X
> >> > $IMPLEMENTED_BY = 'File::HomeDir::Darwin';
> >> > + # fallback to File::HomeDir::Unix if File::HomeDir::Darwin
> >> > + # doesn't actually work e.g. Mac::Files is missing or broken
> >> > + $IMPLEMENTED_BY = 'File::HomeDir::Unix'
> >> > + if not eval "require $IMPLEMENTED_BY;
> $IMPLEMENTED_BY->my_home";
> >> > } elsif ( $^O eq 'MacOS' ) {
> >> > # Legacy Mac OS
> >> > $IMPLEMENTED_BY = 'File::HomeDir::MacOS9';
> >> >
> >> >
> >> >
> >> >
> >>
> >
> >
> >
>
>