From: Piotr Szotkowski Date: 2011-06-17T02:07:07+09:00 Subject: Re: Kernel#autoload vs require_relative --9l24NVCWtSuIVIod Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Piotr Szotkowski: > Hm, I do prefer using require_relative over require + $LOAD_PATH > changes; it looks cleaner to me and doesn=E2=80=99t touch shared > globals, but I guess that=E2=80=99s more of a personal preference. =E2=80=A6and now I recalled my particular use-case: require_relative 'set' will pull in =E2=80=98my=E2=80=99 Set, whereas require 'set' will pull in either =E2=80=98my=E2=80=99 Set or the stdlib=E2=80=99s Set de= pending on whether I prepended or appended the $LOAD_PATH with File.dirname(__FILE__). // I do agree name clashes are at best avoided and at worst // thoroughly documented, with require './set' being a (somewhat // ugly) solution as well, but require_relative=E2=80=99s independence // from $LOAD_PATH ordering does look appealing to me, hence my // longing for Kernel#autoload_relative. :) =E2=80=94 Piotr Szotkowski --=20 /* obligatory Perl joke (omitted for brevity) */ [Tomasz Dubrownik] --9l24NVCWtSuIVIod Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (GNU/Linux) iEYEARECAAYFAk36ODAACgkQi/mCfdEo8UqVRgCgnEC7Y3ZVnzQ9njuZSOH0Pkhe 0/IAoKieLOTnhiX12wStE7O8ayGdLlvZ =tb+t -----END PGP SIGNATURE----- --9l24NVCWtSuIVIod--