Skip Menu |

This queue is for tickets about the ParseUtil-Domain CPAN distribution.

Report information
The Basics
Id: 87359
Status: open
Priority: 0/
Queue: ParseUtil-Domain

People
Owner: Nobody in particular
Requestors: twmattyoung [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Re: File a bug for ParseUtil::Domain
Date: Fri, 26 Jul 2013 10:25:47 -0700
To: "bug-ParseUtil-Domain [...] rt.cpan.org" <bug-ParseUtil-Domain [...] rt.cpan.org>
From: Matt Yang <twmattyoung [...] gmail.com>
Hi Travis, Thanks for your promptly reply. The domain looks also invalid to me and I agree with you. But is there any way I can let the module continues without stopping my following procedures? Can we return 'undef' from parse_domain() if we see the parameter is invalid? Can you suggest some ad hoc so I can do it from my end now? Thanks again. On Thursday, July 25, 2013, William Travis Holton via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=87339 > > > Hi, > > I did some checking as I was not sure myself if Nominet had changed their > rules, and I believe the problem that domains registered directly under .uk > are not possible. Nominet only allows domain registrations under a specific > set of second level domains. The list can be found in Appendix A of this > web page: > > > http://www.nominet.org.uk/uk-domain-names/registering-uk-domain/choosing-domain-name/rules > > My module is intended to only allow valid domains and "carbuyer.uk" is > strictly speaking not a valid domain name. If you still think this is an > error or can find documentation of domains directly under .uk, I'd be happy > to change the module to allow them. > > Regards, > > Travis Holton >
-- Matt Yang
Hi Matt, Just to get you going, I recommend putting your executing code in an eval block or to use one of the cooler exception catching modules like Try::Tiny or TryCatch. my $data; eval { $data = parse_domain("carbuyer.uk"); # do something with data from domain }: if (my $e = $@) { # print to a log file or stderr print STDERR "There was an error processing $domain: ".$e } That way at least your program will keep going and you can check your error log file later for domains that could not be parsed. As a general rule, I think it is considered better to die with an error than to return something that might be ambiguous. Domain endings change all the time and I admit, I'm not really on top of that like I used to be. Therefore, if you find some domains that you think should have worked, I would be glad if you would let me know ;) Cheers, Travis Holton On Fri Jul 26 13:26:02 2013, twmattyoung@gmail.com wrote: Show quoted text
> Hi Travis, > > Thanks for your promptly reply. The domain looks also invalid to me > and I > agree with you. But is there any way I can let the module continues > without > stopping my following procedures? > > Can we return 'undef' from parse_domain() if we see the parameter is > invalid? Can you suggest some ad hoc so I can do it from my end now? > > Thanks again. > > On Thursday, July 25, 2013, William Travis Holton via RT wrote: >
> > <URL: https://rt.cpan.org/Ticket/Display.html?id=87339 > > > > > Hi, > > > > I did some checking as I was not sure myself if Nominet had changed > > their > > rules, and I believe the problem that domains registered directly > > under .uk > > are not possible. Nominet only allows domain registrations under a > > specific > > set of second level domains. The list can be found in Appendix A of > > this > > web page: > > > > > > http://www.nominet.org.uk/uk-domain-names/registering-uk- > > domain/choosing-domain-name/rules > > > > My module is intended to only allow valid domains and "carbuyer.uk" > > is > > strictly speaking not a valid domain name. If you still think this is > > an > > error or can find documentation of domains directly under .uk, I'd be > > happy > > to change the module to allow them. > > > > Regards, > > > > Travis Holton > >