In the ABYC standards you are allowed 10 feet of wire run from the
shore power inlet to the breaker. The logic here is that shorts are unlikely in well installed fixed wire runs compared to junctions and
panels. Of course nothing prevents you from doing something BETTER than the standards require.
In most cases that wire is protected by the breaker on the
shore power supply. BUT... if you use an adapter to
plug a 30 AMP
power cord into a 50 AMP shore
power supply than you are NOT well protected.
The answer is pretty simple, install a breaker as close to the shore power inlet as possible. I did on my
boat.