Subject: | Useless use of ->new ??? |
->new appears to do nothing but create an empty object, that never stores anything...
Can or should the other methods be used directly?
File::Type->checktype_contents($data) for example.
If so, it might be worth noting that you can in the docs.
If you do need to store something, would if be worth putting in a
sub foo {
my $self = ref $_[0] ? shift : shift->new;
...
}
in each of the methods, so that they create as needed.