without otherwise checking your code, when you create a subroutine file for plugins you must end it with a 1; so that when it loads it indicates it loaded correctly. You do not have a 1; at the end of your file so the system will assume there was an error loading them and ignore them.
Code:
sub check_hasitem {
# code to do the checking
}
1;