From henrik.bengtsson at gmail.com  Tue Jul 12 20:55:38 2016
From: henrik.bengtsson at gmail.com (Henrik Bengtsson)
Date: Tue, 12 Jul 2016 11:55:38 -0700
Subject: [Rd] Is .packageName part of the official API?
Message-ID: <CAFDcVCQ+SopjJf7EfTvNyZTUtrteZ8J8BKdf9oDmBiBzb8y8ug@mail.gmail.com>

Hi, I've seen that some packages use .packageName internally to infer
their own name.  Is that officially supported?  I could not find it
documented anywhere.

There's utils::packageName(), which internally looks for .packageName.
However, if the latter is not found, it may return NULL whereas an
error would be more appropriate if a package name is expected.  Using
.packageName would give an error if it does not exist.  Also, which is
minor, using packageName() would add explicit dependency on the utils
package whereas .packageName doesn't.

So, should I use .packageName or utils::packageName() for this?

Thanks

Henrik



[Rd] Is .packageName part of the official API?
Henrik Bengtsson