I love Joe Royle and if he stayed for longer then there would be no doubt about who would have been the better manager, if the same things happened after 2002.
There is also no doubt that Royle is in the argument, as he did win a trophy and much like Moyes, he gave us our respect back, in league terms.
Moyes is also definitely in the argument. Yes, he did not give us a trophy. You can pour scorn on the 7th placed finishes all you like but there were a few 5th and 6th, along with a 4th as well. So the fact that he kept up a decent standard for so long, without spending nearly a fraction of the teams above him and some below him, was an achievement. It may not be the exact achievement we wanted but it was still on the achievement 'spectrum'.
I may be biased, as I was going to the games under Moyes and was only a teenager living away from Liverpool when Royle was here. But I would just give the record of Moyes slightly higher than Royle, just for longevity and the fun we had away in Europe on multiple occasions.